Jump to content
  • Advertisement

Archived

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

joshuas

OpenGL OpenGL for 2D?

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

Sorry if this has already been discussed previously, but I couldn''t find anything... The OpenGL spec states that it can be used for 2D, though its emphasis is on 3D. As far as 2D support, I am assuming they mean polygons with texture mapping and orthogonal projection? That''s the first question. My second question, is really just a request for advice/opinions... I am fairly new to graphics programming. Lots of reading but not much practice. I know most languages (c++, java, etc.) I have already done the simple examples I have found around the net, though most are for 3D type applications. My personal choice is to use OpenGL libraries vs DirectX for various reasons such as simplicity. (Clarify: PERSONAL opinion/choice). Is it worthwhile to learn/practice OpenGL for 2D graphics programming (a very simple game is my only planned project right now) when DirectX (not DX3D) seems more suited for 2D graphics on Windows, plus the fact I will have to use the other Direct libraries for sound, input, etc. Just looking for opinions towards 2D graphics programming. thanks.

Share this post


Link to post
Share on other sites
Advertisement
I wish I could point you to the thread that I was talking with a few people on.
You CAN use oGL for 2D graphics via commands like glDrawPixels() and whatnot, as well as by texture mapping quads. It seems that a lot of people run into some very serious performance issues with glDrawPixels, so they do the textured quad thing.
You have to get menus somewhere, and when you use oGL it can''t be via the Windows GDI (if you''re using windows that is).
If you want to go 2D only I suggest taking a closer look at DirectDraw, as it is quite a bit faster for raster functions.

-BacksideSnap-

Share this post


Link to post
Share on other sites
Also, if you need the capabilities of a 3D API for stuff like alpha blending, you might consider using D3D since it''s a bit better geared towards working in 2D.

Share this post


Link to post
Share on other sites
Speaking of OpenGL and 2D, how is OpenGL used over 2D? I mean, Icewind Dale is going to use OpenGL spell effects over 2D. How''s that? I can''t figure it out, but then I''m not an OpenGL expert...

Share this post


Link to post
Share on other sites
yes you can do 2d. just keep the z coord constant. well, I guess that would make some easy depth effects. not too tough. for a tile engine just draw a bunch of textured quads.

JoeMont001@aol.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!