Only swapping screens=SLOW!!!

I done some OpenGL program in BuilderC++.
There are two spheres rotating arround the screen. No tekstures included! I measure FPS and I get only 60 fps on my machine in win2000 and about 20 fps in Win98SE.
Quake 2 runs about 170 fps in Win98SE.
It seems that my code sucks.

  1. Why is such a difference between win98 and win2000?
  2. Why two spheres without textures runs about 9 times slower than Quake 2 with all textures and etc…
  3. When I cut out two spheres from my program
    I didn’t get any improvemet in performance.I just swapping screens without any data.

Where I fail in my program?
Please help me.
Best Regards
Davor Grguric

It sounds like you are not using the hardware to accelerate the drawing in win98se.

I am not sure how BuilderC++ generates the windows code for your app. Maybe you are rendering the scene twice or you cache the model data every frame, something like that.
I can only guess.

Hi there

If you put this code in your init routine, you’ll be able to know what you’re really using in OpenGL

char *r=(char *) glGetString(GL_RENDERER);
char *v=(char *) glGetString(GL_VENDOR);
char *ver= (char *) glGetString(GL_VERSION);
char ext=(char) glGetString(GL_EXTENSIONS);

Then you run in debug mode and put a break point in front of the first line. A few step latter, you’ll be able to know if you use hardware or generic renderer.

I have the problem and I already know that my app use software mode.

Hope this will help

Frenchi Guy

I allready checked with glGetString() and as result i get
etc… so I think that my app use hardware.
Am I correct?
Please post replay.


Yes in fact you’re lucky. It seems that your code use the hardware of your system. I wished it worked on my system too.

If you could send me your code, perhaps I may help.

See you soon.

Frenchi Guy

Hehehehe, i have a tip for you. Go into display options and increase the refresh rate for the monitor (WARNING! Make sure your monitor support the frequenze!) Problem is that when you get 60fps in NT is because the rendering is synced. One other reason could be that the examples that comes with BCB uses a timer, so changing the timer could speed it up.

And as usual, i could be completely wrong.