Jump to content
  • Advertisement


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


OpenGL OpenGL and 2D on SDL

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

I was just reading SDL''s manual and have one question. When I init SDL to work with OpenGL, can I still use SDL''s 2D code?

Share this post

Link to post
Share on other sites
Yes, by using the SDL_OPENGLBLIT instead of SDL_OPENGL.
I wouldn't recommend using it though, as it's not the fastest thing around.

There's a hack to convert SDL's 2d blitting to OpenGL's, but it's not yet complete.

I'd suggest writing your own code, using a orthographic matrix in OpenGL. It's not that hard, and it's fast and you can do some cool effects (Like very cheap transparency, scaling, & rotation)

EDIT: I forgot to mention the SDL_OPENGLBLIT is a flag to SDL_SetVideoMode

[edited by - TravisWells on August 12, 2002 9:00:40 PM]

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!