Archived

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

Erkki

OpenGL 2D in OpenGL (usgin glSDL)

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