Jump to content
  • Advertisement


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


OpenGL OpenGL and MFC

This topic is 5684 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

OK, I have been posting in here for the last few weeks about problems with NT and OpenGL. I had and MFC project that used to work on a win 98 PC. This I managed to lose, and then I was sent away on business with a works Laptop, so in my spare time I recreated it (or so I thought) on the Laptop. The framework is very simple, it draws a few lines, (in orthographic) and then draws a few textures on 64 * 64 tiles. No matter what I do, all my textures appear as blue (which is the colour of the last line drawn), but only the White areas of the Textures are drawn in the blue colour, the rest is black. (or transparent I suppose). Can anyone shed any light on this problem, or even supply me with some code or bitmaps that they know definitely work (MFC code please if possible, I want to reproduce as much of my system to analyse the faults) on my NT machine. As an aside, I got home the other weekend, and ran the new code on my desktop, and no joy there, I get the same problem, so I don''t believe it is an NT issue. I only want to get a basic framework, I''ll butcher it to my own needs from there, but if anyone can shed some light or effer the framework, then I''ll but you as many drinks as you like if I ever meet you Thanks, Bp

Share this post

Link to post
Share on other sites
I had a similar problem myself sometime ago. My mistake was that the GL texture env mode was set to GL_MODULATE but should have been GL_DECAL.

To resolve this, just use


See the Docs (e.g. MSDN Library) of glTexEnv* for the differences.

If, however, GL_MODULATE is what you wanted in the first place, e.g. to do proper alphablending, you should set the current material to a white one, which prevents the fragments from getting blue.


Ok, now I am really looking forward to the drinks part! :D

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!