OpenGl slower and slower!

Started by
13 comments, last by wugamp 11 years, 8 months ago

to Mhagain: I timed with my mobile phone. In fact, I'm not interested in timing now. Task-manager helps more.

What? You said your program gets slower and slower. Which indicates it's taking more and more time to accomplish a given amount of work. Which means you should be interested in its timing behavior. How on earth are you timing with Task Manager? And how did you time it with your phone?? Can you exactly define what you mean by "slower and slower?"
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
Advertisement
Post the code the wild guesses are not helping but ill try some anyways
1. Are you using the old fixed pipeline approach (it could be phasing out driver wise because opengl is/did drop it)
2. VC6? common with all the hotpatches and crap over the years I wouldnt be surprised if just mentioning it leaked some memory
3. What kind of machine are you on? vc6, noticeable 6mb difference in memory, cant use the gdebugger?
4. How are you timing the frames in code and screen
5. Could just be your drawing code is off causing it to look slower and slower (get the fps)

Call RenderScene() again and again, and it will occupies more and more memory. But if I remmed glClear, it won't.

Maybe I don't use glClear properly?


This is normal behaviour. Your driver will build up some memory usage over the first few seconds/minutes, then settle down. You've got a bug in your code somewhere; it's nothing to do with your driver. You need to build up some accurate profiling results using a reliable timer, because right now you're just chasing ghosts. You basically have no reliable information to base any kind of conclusion about your program's performance on.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

I worked with gDEBugger for the last two days and I found:
1. when my code gets "slower and slower", the value of "GDB GL Frames/sec" is between 0 and 1. That is, more then one frame per second.
2. At the same time, an information "Debug String: Warning: hDC is NULL in CWnd::GrayCtlColor; WM_CTLCOLOR not processed." shows in "Debugged Process Events" again and again.
I have almost solved the problem. I didn't ReleaseDC after GetDC. After adding ReleaseDC, my code can run for 30 minutes while the fps is always very high.
Thanks for everyone replied to the topic!

This topic is closed to new replies.

Advertisement