I have an image struct, like this:
// image structstruct image_bd_s{ GLuint handle; bool loaded; unsigned int width; unsigned int height;};
After loading (or binding) a texture, OpenGL overwrites some of the data in the struct. The height variable is set to a ridiculously high value, which causes OpenGL to attempt to draw texturesover millions of pixels in height.
I'm not sure where this is happening. It might be during the loading of the texture, or perhaps when I bind the texture.
I tried moving the GLuint handle to the bottom of the struct. However, this simply causes the program to crash, as OpenGL is overwriting memory outside of the struct.
Anyone have any ideas why this is happening?