Archived

This topic is now archived and is closed to further replies.

No color when using MFC?

This topic is 5884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can anyone confirm this bug? Download opengl's MFC source code... http://www.opengl.org/developers/faqs/technical/mswindows.htm#mswi0160 color is present in debug mode. But when switched to release mode, color disappears. however, if you close and open application quickly for a few times, the color will appear... Any solutions? Edited by - SneakyTommy on October 30, 2001 12:16:26 PM

Share this post


Link to post
Share on other sites
quote:
Original post by SneakyTommy
Can anyone confirm this bug?

Download opengl''s MFC source code...

http://www.opengl.org/developers/faqs/technical/mswindows.htm#mswi0160

color is present in debug mode.

But when switched to release mode, color disappears.
however, if you close and open application quickly for a few times, the color will appear...

Any solutions?

Edited by - SneakyTommy on October 30, 2001 12:16:26 PM




I had the same problem when I brought my application from Uni to home.
The problem was with glEnable(GL_TEXTURE_2D) and glClearColor, I needed to call it(actually I call glColor4f(0.0,0.0,0.0,0.0) after I drawn something with color).
So, to draw somwthing with color (line) I call glDisable(GL_TEXTURE_2D); glColor4f(0,0,0,0);
then my color - glColor3f(0.0,1.0,0.0);
then turn textures back on - glEnable(GL_TEXTURE_2D);


Share this post


Link to post
Share on other sites