Ok, so, I feel sheepish... Bit of looking at my own GL code and realized I did the binding wrong
Here is the proper GL init stuff:
Code:
glGenTextures(1, @FGLImage); // THIS WAS WRONG, it was pointed at png.data :(
glBindTexture(GL_TEXTURE_2D, FGLImage);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, png.Width, png.Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, png.Data );
Here is another screenshot showing the fixed gamma and color space:
- Jeremy
Bookmarks