Advertisement Jump to content


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


OpenGL opengl with gdi

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

Hi, Can I use the windows gdi to do text and bitmaps with opengl? If i use it, it won''t mess up my opengl stuff will it? Thanks ECKILLER

Share this post

Link to post
Share on other sites
You can use GDI calls on your OpenGL context - but and it''s a big but...

You can''t write to the back buffer with GDI so you''ll get major flickers. Not OpenGL''s fault, it''s a limitation of Windows'' GDI.

Paul Groves.
OpenGL for Beginners

Share this post

Link to post
Share on other sites
Pauly is right. You can be pretty sure GDI will work with an OpenGL context, but only on the front-buffer. So its pretty useless for games. wgl (Microsoft''s bindings for OpenGL in Windows) sucks and Microsoft will likely never fix it.

Popular rumor has it that Microsoft had a version of OpenGL that could peacefully coexist with DirectX surfaces (so you could do 2D work with DirectX) many years ago, but ditched it to try and persude game developers to use Direct3D.

In any case... ECKILLER, check out an earlier post to this very board for some more information:

Also, if you want to see some source code, check out my Genesis3D driver (which, among other things, uses OpenGL to do 2D bitmap blitting using OpenGL texture mapping and simple quad-polys):

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!