Opengl 1.1 vs Opengl2.0 Performance

Started by daniel_nieto, April 11, 2011, 06:14:56

Previous topic - Next topic


Hello, i'm developing a 2D Game Engine with lwjgl and i'm using opengl version 1.1, but i have a performance question: is opengl 2.0 faster than opengl 1.1? i'm asking this because a simple game i made (like a tower defense) runs 850 fps on title screen and 450 on gameplay, i've tried Slick and i can see it runs the demos easily at 850 fps in gameplay,  and even JMonkeyEngine3 runs it's demos at 700 fps, but they are in 3D!, i've tried to optimize my code and i already speed it up by 10-15% but no more, can i expect more speed if i implement opengl 2.0 as in Slick and JME3?  Another question, do LWJGL caps the speed of an application to 1000 fps top??? because i did a test with an infinite loop (without LWJGL) that only calls a function i made to show the FPS on console, and this loop runs at 1'600,000 times per second!!!!!!! why does it slows down to 1000 times per second, when i call the Display.update(); method?

thanks in advance!!!


I would guess that proper execution of more advanced OpenGL options will speed up your implementation, yes. Otherwise they wouldn't have added them.

Quotewhy does it slows down to 1000 times per second, when i call the Display.update(); method?

Because Display.update takes time! :D It causes the buffers to switch so that everything that's been rendered is now on the screen. If you get a max frame rate of 1000, it just means that it takes about 1 millisecond on your computer, which isn't that bad.

Also, I think you're getting a bit over-worried about performance. 450 fps is really good enough for most games.


450fps is fast enough indeed! but im on a decent pc, when i try it on slower pc's it runs at 60 top and not steady, mainly on the first run (im aware of java's warmup and i've implemented the vm option CompileThreshold) that's why im asking!


Can you put up a screenshot of your game so I can see how much is going on?

If you're slowing down on an older PC, it's entirely possible that it's such a POS that you don't need to worry - for example, if you only have about 100 textured quads and you're still slowing down on the computer, don't worry about it, either the drivers are bad or there's simply no hope.


i've uploaded this 4 screenshots, first is the title screen, and the others are from the gameplay, you can see the FPS on the title bar of the window, i have to say... maybe.... it gets slow because i have an image for each "virus" you see there, and all the animations within that image, so in promedy there are 6 images 1700x600 and one image for the background that is 2000x600, and two other images of 400x600 both, is that could be what is doing fps dropping down?? can i improve it to make it faster?


You said that you're wanting it to run faster on slower computers.  I think the irony might be that 2.0 features don't even work and/or not installed on these computers.  I really don't see how 2.0 would be faster, unless you're taking advantage of newer features that will probably not work on slower computers anyway.  My 2 cents.
cool story, bro


Good point.

My guess is that you're simply dealing with an old computer that's too old. Conceivably you are running out of texture space; if you're using Power-Of-Two textures (the default) your required texture memory is:

1700x600 = 2048x1024
2000x600 = 2048x1024
400x600 = 512x1024.

Still, I'd imagine you have enough memory, but that is still fairly inefficient texture usage.