OpenGL Texture Data Corruption?
I have a simple BMP loading code that, until a while ago, was working
perfectly.
I had to restructure the code a bit, but everything is still the same, and
my texture suddenly stopped showing (instead, it shows only a darkish blue
color on the quad).
So for tests, I made a new BMP in 40x40 size, with a checkers like texture
divided in 4 regions of pure red, blue, green and yellow. It shows
perfectly.
I tried to display the other textures, no success. I tried other images as
well, no success. Just the same dark blue quad.
So I decided to take my checkers (the only working texture for some
reason), and copy 4 pixels of the texture I want to display in the first 4
pixels of my checkers texture.
So besides the first "red" region, there's 4 pixels of the texture that
isn't displaying.
When showing this, the first line is messed up with a dark/light blue, the
rest is okay.
If I do this (copy the pixels in any line) the entire line of the checkers
texture gets corrupted.
I'm completely out of ideas as I thought it was a code error, it seems to
be a texture corruption bug.
What could be causing this, or what suggestions would you have to debug
what could be causing this?
No comments:
Post a Comment