Re: [Super-tux-devel] Game objects
Brought to you by:
wkendrick
|
From: Ryan F. <rf...@gm...> - 2004-05-14 16:37:42
|
On Fri, 14 May 2004 15:23:00 +0200, Ingo Ruhnke <gr...@gm...> wrote: > Biggest problem with merging them is that the drawing order will break > completly, one can now try to fix it back up by sorting the list of > GameObjects, but I have found that quite throublesome in the long run > (ie. it doesn't work with objects that have to be both in the > foreground and background like the iglo, so if you have to break it > apart to mulitple objects and such). Clean solution would be to either > switch to OpenGL only and use the z-buffer for the sorting of the > drawing or to create a 'GraphicContext' class that records all drawing > operations and sorts them before evaluting them, instead of having > Surface class directly call SDL_Blit(). Yeah, I was thinking each class could be given a z-order, but this z-buffer thing sounds better. I don't know much about OpenGL though. -- Ryan |