   Better 2D performance
  I'm making my own game and it happens to be in alpha mode still. But im starting to have concerns in the performance of my 2D game. As of my last build, I can draw about 50 multitextured/blended quads on the screen in 2d ortho mode, about 100x200 pixels, before my fps drops to below 60.I've done several tests to see what is causing the fps drop. I check if my Vector STL is causing it, blending on/off, multitexturing on off, etc. and it seems to boil down to just simply the drawing of the 2d quad causes the most slow down. Which to me makes the most sense. But id expect to get around 100-200 quads and stay above 60 fps. I'm running an athlon 2000 xp with a geforce 6 256 mbs.I'm drawing them in intermediate mode, which i understand switching to a display list or vbo with only 200-400 polygons on the screen wont give any performance increase.[Edited by - ViperG on June 22, 2006 2:31:24 AM]
  Immediate mode is what the problem is. The issue is with 400 polygons lets say you are drawing quads you have 4 calls per vertex, and looks like blending and multitexturing (assuing two textures) so without normals you are looking at per polygon 4 + 2 = 6 x 400 = 2400 calls at least with your CPU for each frame just in rendering you polygons. I don't know for sure what your doing but if you can I would post some code for rendering your scene so people can take a look. Ortho isn't your problem... You might be setting up a new texture each frame... I don't know due to I haven't seen any code.   ;  Well I gave Display lists a shot and I had the same problem.Depending on how big I draw the quad, if I throw 60 of them on the screen with 2 textures (multitexturing) my fps ends up being 47-60.I tried blending on and off with my display list, single texture, no multitexturing...I got an extra 10-20 fps turning off multitexturing, but I need that on.The only thing I could do to get more performance was to change the textures so they had no filters. I got about 30 extra fps making the textures pretty crappy looking. This is defently a fill rate problem. Changing the size of the quad makes a difference. a 50x50 quad only drops my fps to 100. if I go 100x100 x it gets worse. if I make the quads like 1/2 my screen, it kills my fps. I also commented out the part that draws the actuall polygon, just your standard opengl vertexs and texturecoords, and when i did this i could put over 400 of these fake quads on the screen and i only lost 10 fps. but of course its not drawing anything. i was just checking to see if something else besides the quads were slowing down my performance... :(I need a opengl benchmark program that will let me know how many polygons my computer can handle on screen at once.I suppose i can make it my self.   ;Quote:Original post by ViperGI suppose i can make it my self.well, yes, you could... but it would be wildly inaccuate as apprently your OGL code currently sucks.How do I know this?GF6, 60quads with two textures at 60fps... something is very wong somewhere...As Mars says (I think he has picked it up from me), we're going to need to see code to help, because 10 lines of code are worth more than a paragraph of vague descriptions...   ;Quote:Original post by phantomQuote:Original post by ViperGI suppose i can make it my self.well, yes, you could... but it would be wildly inaccuate as apprently your OGL code currently sucks.How do I know this?GF6, 60quads with two textures at 60fps... something is very wong somewhere...As Mars says (I think he has picked it up from me), we're going to need to see code to help, because 10 lines of code are worth more than a paragraph of vague descriptions...;) I must follow in the masters foot steps, for I am a grasshoper! Yeah his code is totally garbage, if you have a 6series card and 60quads two textures you should be doing hundreds of fps maybe even a 1000fps. My terrain engine has a lot of shaders and many texture accesses and PPL, water, sky, shadows, models ect.. and at 1600x1200x32 I am doing around 40fps on a 7 series card. So yeah your code needs some TLC.;  If you are using intermediate mode, try switch to vertex arrays.I think it will boost your application through the roof ;)Another good thing is to combine the tile textures in a texture atlas.So you don't have to switch between many textures and you can draw all (or many)Quads (TriStrips are better) on the screen with one or some more calls...Marc   