Have you benchmarked your systems? That is, have you written a simple program that:
- Clears the screen with a different colour.
- Fills the screen with random-sized rectangles using the built-in ‘fast’ blitting operations.
- Calculates how long it takes to display 50 or 100 such rectangles.
This should give you the fundamental performance of the underlying hardware/software on the system.
Now, if your game isn’t squirting stuff out at that speed, then the problem is in your design or implementation.
OpenGL isn’t some performance ‘magic bullet’. It just gives you access to hardware that is specialised toward doing certain things, mainly 3D. Even then, you’ll only get significantly better performance if you use it correctly.
From: email@example.com [sdl-bounces at lists.libsdl.org] On Behalf Of Jonathan Dearborn [grimfang4 at hotmail.com]
Sent: 06 August 2008 12:19
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] Need to learn OpenGL for fast 2-d blitting of images and text…
My 1024x768 game runs fine at 30Hz on a 2.0 GHz CPU with 256Mb RAM. It’s all software-driven, scrolls 4 ways, and has a full screen refresh. With a dual-core Macbook, I can put it up to around 50Hz. You could try glSDL if you want OpenGL as a back-end for SDL’s standard blitting stuff. If you do want OpenGL, take a look at the NeHe tutorials (http://nehe.gamedev.net/).
Date: Tue, 5 Aug 2008 17:08:24 -0400
From: slnthero at aol.com
To: sdl at lists.libsdl.org
Subject: [SDL] Need to learn OpenGL for fast 2-d blitting of images and text…
Need to learn OpenGL for fast 2-d blitting of images and text…
I need an easy way to do the above.
Native SDL is ridiculously slow.
I wish to make a new game with 4-way full window scrolling,
and this is impossible to do with native SDL.
Any help would be greatly appreciated, thanks!
Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
SDL mailing list
SDL at lists.libsdl.org