I just started looking into the good stuff Three.js has to offer.
Now while trying to render a sphere with a texture I run into a problem.
I created a photosphere image and tried to load it onto a sphere.
I am using the WebGL renderer build into Three.js (got the latest zip from GIThub).
Two things are puzzeling me:
- The sphere including texture is rendered perfectly in both FF and Safari, but not in Chrome (24.0.1312.52).
- When I try another picture, from the example of @kennydude on github, it does work in all three tested browsers.
The only sign of something going wrong in Chrome I get is this warning:
WebGL: INVALID_VALUE: texImage2D: width or height out of range
My script is completely based on the example of @kennydude. I traced the error all the way back into the Three.js file r. 55 on line 25330. That is as far as I can get.
To get webGL running in Chrome I disabled the blacklist (my GPU appeared on that list).
Any ideas? Any help would be highly appreciated.
gl.getParameter(gl.MAX_TEXTURE_SIZE)
. If the texture you want to load is too large consider creating a canvas, draw the image into the canvas to resize it, then make a texture from the canvas. – gman