You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a strange problem with my emscripten, C program, which loads images to display via WebGL 1.0. The images I have in the virtual filesystem of emscripten and load via IMG_Load here. Works fine, even for NPOT textures and dimensions not divisible by 8. I even made sure WebGL doesn't complain with glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
However, users are supposed to upload their own images, which I receive in a memory buffer and load via IMG_Load_RW here, which receives a buffer of the file uploaded here. The images loaded with that function however, have their memory alignment mangled. I get skewed images, ones with RGB boundaries mixed up ending in a rainbow mess, etc.
So I'm confused what I'm doing wrong, if IMG_Load works fine and loads everything perfectly, why does does loading from memory via IMG_Load_RW fail?
The text was updated successfully, but these errors were encountered:
I'm having a strange problem with my emscripten, C program, which loads images to display via WebGL 1.0. The images I have in the virtual filesystem of emscripten and load via
IMG_Load
here. Works fine, even for NPOT textures and dimensions not divisible by 8. I even made sure WebGL doesn't complain withglPixelStorei(GL_UNPACK_ALIGNMENT, 1);
However, users are supposed to upload their own images, which I receive in a memory buffer and load via
IMG_Load_RW
here, which receives a buffer of the file uploaded here. The images loaded with that function however, have their memory alignment mangled. I get skewed images, ones with RGB boundaries mixed up ending in a rainbow mess, etc.So I'm confused what I'm doing wrong, if
IMG_Load
works fine and loads everything perfectly, why does does loading from memory viaIMG_Load_RW
fail?The text was updated successfully, but these errors were encountered: