Reputation: 9398
I'm having an odd problem. On Chrome and Firefox, everything is fine, but in Safari when I load 2D images onto a particular panel (using WebGL) I get the following error:
WebGL: INVALID_VALUE: texImage2D: packImage error
The images are greyscale 128x128 jpegs. I can provide more code if necessary, but I'm having trouble even finding out what this packImage error means.
Thanks!
Upvotes: 0
Views: 807
Reputation: 1353
I found that after loading the texture, you just need to set the appropriate format. For instance:
var tex = THREE.ImageUtils.loadTexture('img/grayscale.png');
tex.format = THREE.LuminanceFormat;
Upvotes: 2