Skip to main content
GameDev.net gamedev.net
🔒 Locked

Texture mapping discolorings

Started by Toolmaker Dec 1, 2008 at 7:58 AM 3 replies 750+ views
Original Post
Toolmaker
Toolmaker
I'm currently working on some OpenGL code for the application I professionally work on. I'm not well versed with OpenGL. What I did was update the way our application renders bitmaps. My predecessor never knew about textures on the videocard, so he figured it was a cool idea to just render all bitmap pixels as colored quads. I patched up his code by dumping the bitmap as a texture_2d on the GPU, and then rendering a textured quad with the texture bound to it. It all works great, with 1 exception. It somehow blends in additional color from the quad I draw. I turn off GL_BLEND with glDisable() before calling glBegin() and no errors occur. This is the output: And the original can be seen here: Any ideas? Toolmaker
 
Toolmaker
Toolmaker
Sorry to tell, but that doesn't work.

Toolmaker
 
Toolmaker
Toolmaker
Same result... But I'm reading through some code and I ran into this:
        GLfloat matdif[4] = { 1.0f, 1.0f, 1.0f, 1.0f}; // render color                glMaterialfv (GL_FRONT_AND_BACK, GL_DIFFUSE, matdif);


Could that be related?
 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.