Jump to content
  • Advertisement

Archived

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

The_wow

OpenGL OpenGL in 2D

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

Advertisement
Set up the view in Ortho mode it takes away the Z axis so you just have the X and Y. You might wanna check out NeHe''s lesson 25 I think it is.

Share this post


Link to post
Share on other sites
Isn''t that much slower, because there are still those matrix-calculations being made?

I think that directdraw is way faster, because you write it directly into the videomemory, isn''t? If I were you, I would just learn the basics of DirectDraw and use it. It depends how big your idea is that you want to accomplish.

Share this post


Link to post
Share on other sites
As far as I understand DirectDraw, you have to lock the framebuffer before you can draw to/read from it. You are not guaranteed to draw to/read from the actual frame buffer, but maybe a copy of it, and the copy will then be copied back to the real frame buffer when you unlock it.

A textured quad is really fast. If you have hardware accelerated 3D graphics that is. There sure are some matrix maths going on, but compared to the total price of getting a picture on the screen, this is almost nothing.

Share this post


Link to post
Share on other sites
i havent tested this (ild be interested to see) but i believe with all cards nowadays u can draw 2d faster with opengl than with directdraw

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you haven''t tested it what is your opinion based on?

Share this post


Link to post
Share on other sites
2D card technology hasn''t changed a bit in the last years, besides if you write directly to the framebuffer, the graphics pipeline will be ignored and thus reducing the FPS.

Remember that nowadays all graphic cards are made to support 3D graphics. The 2D graphics are only meant to GUI environments, all you get is a VESA compliant API.

If you use OpenGL, or DX, to do 2d programming all your blits will go thru the 3D graphics pipeline and be hardware accelerated.

In case you don''t know, Microsoft has killed DirectDraw in DX exactly for this reason. If you want DirectDraw in DX 8.0 onwards, you must use the DX 7.0 interface.

And the best of all is that you can apply 3D features of the graphics board to the textures.

Share this post


Link to post
Share on other sites
>>If you haven''t tested it what is your opinion based on? <<

Q/ what do card makers want?
A/ the best benchmark scores

when was the last time u saw a directdraw benchmark score?
the 3d pipeline is where all the optimizations have been done for the last few years (+ will continue for sometime)

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
this probably isn''t a good example but anyway ...

http://members.fortunecity.com/thejoker78/projects.html

it''s 2d and not in the orthographic view, based on game programming code from shining knight

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!