I’m not good enough at REAL coding to compile your source code, since
I’m on Windows/Mac, but I know that immediate-mode drawing for OpenGL
can be VERY slow indeed, which may explain your particular situation.
You didn’t mention this, so are you using display lists in OpenGL for
each tile type? That speeds up rendering SO fast, I cannot begin to
describe it! I have worked out the beginnings of a Java 3D game
framework, and I can render multi-thousand poly models at full
framerate (more than 75 fps – monitor refresh) using display lists.
Without, it starts choking at anywhere near a few thousand.
Look up display lists online if you aren’t using them. It’s pretty
simple, I just don’t remember the function names offhand. Basically
you tell openGL you’re starting a list (when you first make the poly
object/instance/whatever it’s called not an object – can you tell
I’m a Java programmer?), then do your drawing code as normal, and
close the list. Like loading textures, you’re given a number for the
list, and you simply call the list using that number whenever you
need to draw that 3D object.
I hope I’ve not been TOO obscure in my description. Look up display
lists for OpenGL and they’ll probly be clearer.
–ScottOn 22 Jul, 2005, at 9:08 PM, Ratty wrote:
Hi.
I’m kinda new do C++, SDL and OpenGL, i’m working on a game, but
when drawing a tile map it slows down a great deal. I’m using
opengl and each tile is a quad, but this only results in 2000
polys, not a huge amount for my system (amd64 3500+ radeon x800xt)
yet the drawing starts to crawl. I can run ut2004 and doom3 at nice
frame rates.
If anyone has nothing better to do could you take a look at my code
and see where i’m going wrong. It probably won’t build in it’s
current state on windows as i use linux (ubuntu) most of the time.
download from http://ratty.ath.cx/junk/Dizzy-0.1.tar.gz
“make install” is probably a bad idea for the moment, just do:
./configure
make
cd src
./dizzy
arrow keys move the player around, it moves 1 pixel per frame.
Thanks
-Ratty
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl