Advertisement

Performance oddity...

Started by April 13, 2002 02:22 PM
8 comments, last by Novalis 22 years, 10 months ago
Hello all... I''m working on an OpenGL based game right and I''ve hit a bit of a brick wall. I had been getting frame rates of around 90 FPS until a few days ago. All of a sudden it''s dropped down to about 18 FPS. I''ve been making lots of code changes all over the place, so I''m pretty confident it''s something I''ve changed in the code, but I have no idea what. Here''s a list of all the relevant facts I can think of: The FPS is locked at 18 FPS no matter what I do (ie only 1 visible polygon, or all visible, 32 bpp color depth, or just 8 bpp, 1024x768 window, or just 320x240) I''ve disable pretty much all the code in the game except the OpenGL drawing code. A profile of my code shows what it alway has (as far as I can remember), that the display list function and the swap buffer function are the biggest time hogs. I''m running Win98 on an AMD 900, with a GeForce 2 ELSA gladiac. Has anyone else come across this sort of thing, and if so, did you find out what you did to cause it?
If a man is talking in the forest, and there is no woman there to hear him, is he still wrong?
You didn''t by chance reduce your os use of hardware acceleration?

win98: right-click/properties/settings/advanced/performance


Do you have an older OGL app that runs normally, i.e. only new code has the problem? If so, and if you don''t use glut, did you alter the code to use a context w/o hardware accel?

Most of my graphic apps run 50-100 fps on my 1 gig athlon w/ geforce2, but with no graphics except a background starfield, I run ~450 fps. (1024x768x32)

zin

zintel.com - 3d graphics & more or less
zintel.com - 3d graphics & more or less
Advertisement
Nope, all my video card settings seem to in order.

Also, I am not using GLUT, and I''m pretty sure my rendering context parameters haven''t changed recently.
If a man is talking in the forest, and there is no woman there to hear him, is he still wrong?
SwapBuffers can take a lot of time if it waits for vertical retrace.

What are you doing with your display lists? Aren''t you by any chance recompiling them every frame? Do NeHe''s display list tutorials run slow as well?
---visit #directxdev on afternet <- not just for directx, despite the name
Well shucks! I downloaded, modified to display FPS, and ran Tutorial 13 (the display list tutorial) and it reported 200+ FPS.

Back to my program and still 18 FPS! I compared the windows creation code between the two, and it''s almost identical. I altered the pixelformatdescriptor parameters to be the same and it didn''t help at all.

My next step was to eliminate pretty much everythign from my program, so now it doesn''t draw the scene. All it does is draw the frames per second, and swap the buffers.

It so aggravating to know you''re doing something wrong but have no idea what!
If a man is talking in the forest, and there is no woman there to hear him, is he still wrong?
I hate to state the obvious, but somebody ought to:
did you maybe change the fps calculation routine? If it still looks like it''s still 90 fps but reports 18, u might have a problem. . .
Advertisement
>>Back to my program and still 18 FPS! I compared the windows creation code between the two, and it''s almost identical. I altered the pixelformatdescriptor parameters to be the same and it didn''t help at all.<<

use sdl or glut + u will never have to worry about this (though im 99.9% sure this aint the problem)

>>My next step was to eliminate pretty much everythign from my program, so now it doesn''t draw the scene. All it does is draw the frames per second, and swap the buffers.<<

thats the best method ( i use it at least 5x a day )
comment everything out + then start uncommenting a function until the problem happens then going into that function + see whats causing the problem

devide + conquer


http://uk.geocities.com/sloppyturds/gotterdammerung.html
easlern: No no... You bring up a very valid question. Unfortunately I''ve already investigated that. I *did* change the way the calculation was done, but it seems to be working.

zedzeek: That''s just the thing, I *did* comment out everything, and it *still* runs at 18 FPS!
If a man is talking in the forest, and there is no woman there to hear him, is he still wrong?
Seems your program to run slower, without looking at the FPS?
If it doesn''t your calculation is false.
Profile it, see where all your performance is going.

Ar you sure, your current (commented) rendering loop is really empty ? Is SwapBuffer really the *only* function you call ? Try to comment out your input routines. Look at the message pump, is there something that hogs the CPU ? In other words: profile

This topic is closed to new replies.

Advertisement