Advertisement

Need faster drawing.

Started by December 24, 2004 12:27 PM
2 comments, last by Drew_Benton 20 years, 2 months ago
First of all I should start by telling you that I'm completly new to this place, so please show some understanding if this question is misplaced, already answered or just plain stupid. I am currently developing a 2D space shooter. The resolution will be either 800*600 or 1024*768, and I will redraw the entire screen each frame. What I am wondering is which API will give me the fastest drawing. I have used SDL before, and I wonder if there is something that draws faster. Another thing that I'm wondering is if I'm using SDL as I should. I tried to do the drawing with SDL_BlitSurface(), but by simply drawing a 1024*768 background image, the loop took about 80ms on an Athlon 2800. Are there any ways to cut that time?
RymdskeppPsyborg Faction - It pays to be more than human.
If you use a 3-d api like opengl or direct3d (even for 2-d graphics), you can take advantage of hardware acceleration. That would probably be the fastest. Draw all of your sprites and tiles as textured quads.
Advertisement
I am actualy working on a library to solve this problem. I am to lazy to write my own game for it. It is as powerfull as OpenGL, cause thats what it uses for rendering, and as portable as SDL, because thats what I use to setup the window. I'm actualy looking for a project to port.

PM me if you want more details.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
I'd suggest using OpenGL via SDL. It should be plenty fast for you and you will only have to do a few modifications to add in OpenGL support. However, you will have to make some changes to the way you draw and load your images because you will be using glOrtho mode (2D) and using OpenGL tectures instead of SDL_Surfaces.

This topic is closed to new replies.

Advertisement