Am Dienstag, 26. Dezember 2006 02:53 schrieb Christian Ohm: > On Tuesday, 26 December 2006 at 2:37, Dennis Schridde wrote: > > I just profiled Warzone using gDEBugger. > > > > The logs are horrible and attached. > > (I monitored ~3 frames) > > > > Basically it looks like this: > > Lots of Matrix popping > > Which is bad, especially if uses any glGetWhatever functions, those just > kill performance (I think the shadow code uses that). Didn't look like it uses glGetX, only A LOT of glPopMatrix and glPushMatrix. ... Really a lot.
> > Lots of texture binding > > Shouldn't be too bad, just uses up memory. From what I've read in GL3 articles, it sounded like glBindTexture is VERY bad and takes a lot of time... But actually it shouldn't use any memory, because the texture is only bound, not loaded. (Loading it multiple times would be even worse, though.) And glBindTexture taking long would also explain why the (callgrind) profiler reports that WZ spends a lot of time in the terrain rendering functions. I think if we would load the tertile texpage entirely (without spliting it into 512x512 pieces) and just calculate the tile-id into a UV coordinate into the complete tertile texpage, it should remove the need for 99% of the texture binds and thus improve the performance a lot. I tried that a while ago (and still have the patches, if someone wants). It improved the performance a lot, but also didn't display any textures anymore (exercise: why? ;) ). That code looked a bit ugly and had lots of calculations with hardcoded values, so I found it difficult to understand... Maybe I'll sit down later this holidays, but I wouldn't rely on it. > > Lots of redundant enabling of various things > > Yeah, well, like I already said, the graphics engine is not really > suited for OpenGL. That's the one thing that really slows the game down, > and no changes to any other code can change anything about that. > > > When looking at the profiler output you'll see that Warzone loads all > > textures again and again, everytime I exit to mainmenu or start a new > > game. (Allways increases the number of loaded textures by 30.) This one sounds really bad and should be fixed, I think. Mainly a memleak on the graphics card... For users with cards with less than 512MB RAM it could become a problem if they run several games in a row... > > For easier understanding of the CSV: When about 50k GL calls are executed > > we are in the game, otherwise in the menu or somewhere in between. --Dennis
pgpVmhs4xkCpm.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list [email protected] https://mail.gna.org/listinfo/warzone-dev
