Jump to content
  • Advertisement


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


OpenGL 2D in OpenGL (usgin glSDL)

This topic is 5450 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! I want to do a simple 2D renderer using OpenGL. However, I have no experience with 3D APIs (and very little with 3D in general), so I decided to try it with glSDL (a hack which lets you use SDL for graphics like you normally do, but does things using OpenGL in the background). My problem is that while glSDL would probably be enough if I only wanted to blit sprites, I also want to draw lines and filled polygons. I was using SDL_gfx to do that, but it doesn''t work with glSDL. I can get around this by drawing to a buffer surface and then blitting the buffer, but that is slow. Slower than it was originally without OpenGL. What I''m asking is if it''s possible to simply put pixels on screen somehow. Or are there any tutorials for doing 2D in OpenGL? I have found at least 5-6 of them for Direct3D, but I want OpenGL for portability.

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!