Jump to content
  • Advertisement

Archived

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

ECKILLER

OpenGL opengl with gdi

This topic is 6731 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
Advertisement
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.
http://home.clara.net/paulyg
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:

http://www.gamedev.net/community/forums/topic.asp?topic_id=9364&forum_id=10&Topic_Title=Using+OpenGL+for+2D+work&forum_title=DirectX%2FOpenGL%2FGlide%2FGenesis3D&M=False&S=True

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):

http://gmcbay.tripod.com




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!