View Full Version : Sacrilege, or a 2D engine

04-05-2001, 02:43 AM

before being publicly massacred for asking such a question, I will give members of this board a brief description of the situation.

I am writing a 2D game with OpenGL on the MacOS, and my machine has a Rage Mobility/M3 (same chipset as the Rage 128 with a few missing features, e.g. no EXT_texture_edge_clamp). Although this may sound blasphemous to the 3D-savvy audience in this wonderful forum, 2D games need to do as much optimisation as possible -- just like 3D ones...

At the moment I'm using glDrawArrays() to pump out as many textured quads as possible per single texture. I am satisified with the performance (after all, this is "just" a Rage 128-class card), but... I'd like to squeeze out every possible bit of power from my GPU.

So, after this long introduction, the question is: do any of you know of 2D engines or sample code geared towards games that use OpenGL? I have tons of sample code for 3D games and apps, but none of these is really meant to obtain good performance in 2D situations... I understand that it might be difficult to find such sample code/articles/suggestions/whatever, but just in case: I have MacOS, Linux, and W2K, so any of these environments suits me fine.

Thank you very much,

04-05-2001, 05:44 PM
im no expert with the mac but have you looked at http://www.libsdl.org/ theres a few games there ( perhaps some come with source )

in windows theres a couple of handy extensions for 2d stuff wgl_buffer_region + GL_WIN_swap_hint , see here http://oss.sgi.com/projects/ogl-sample/registry/ perhaps you can find apple equivilants.

glScissor is important to use