Origen cruzado - Texturas negras con imágenes de dominio propio

I've read quite a few 'fixes' and tricks for the cross-origin problem but can't seem to fix it for myself. I have no errors, the images are on the same domein as the webgl test but the textures are black and when I keep spamming refresh I can see the Cross-origin error.

Anyone any idea if Im actually doing something wrong? www.mariusposthumus.nl/webgl

preguntado el 09 de septiembre de 13 a las 21:09

Your images might be rendering fine -- you may just not be able to see them because you don't have any lighting. -

This thought had crossed my mind, but I was following a tutorial and there are no lights used in the tutorial. Still I might try to figure out how to do it and see if that helps. -

apparently I had to add a requestAnimationFrame for the render function to constantly update. Then it started working. Thanks for all the suggestions though -

1 Respuestas

I can see "img/floor.png" have size 400x400... Use POT (Power Of Two) textures. (32x32, 64x64, 128x128, ...)

Check catalogs permissions.

Respondido el 09 de Septiembre de 13 a las 22:09

Thanks for the tip, but didn't make a difference - lloydimus

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.