PDA

View Full Version : Strange fps behavior...



Catman
01-12-2003, 11:54 PM
Hello! I've been doing a model viewer (own format) recently, and I've discovered some strange behavior. Here are two pictures (I hope you can access them):
www.freeweb.hu/moondragon/temp/Egyeb/train1.jpg (http://www.freeweb.hu/moondragon/temp/Egyeb/train1.jpg)
www.freeweb.hu/moondragon/temp/Egyeb/train2.jpg (http://www.freeweb.hu/moondragon/temp/Egyeb/train2.jpg)

As you can see on the first image, the program is not optimized yet, hence the low fps...
But as you can see on the second picture, when I rotate the camera 90 or 180 degrees, the fps jumps 3 times higher! (I use an isometric view, so the camera can only be rotated around the y axis)

I have no idea what can cause this. If anyone has any idea, please tell me. If you need to know something about the program, just ask...

Morglum
01-13-2003, 12:20 AM
There is nothing astonishing in this. When you rotate the camera, you change the size of the triangles to be drawn and even the number of triangles to be drawn (GL_CULL_FACE is enabled by default in OpenGL).

Catman
01-13-2003, 12:25 AM
So you say it's mainly fillrate releated...

AdrianD
01-13-2003, 02:17 AM
if changing the rendering resolutuon affects the framerate, then you have fillrate problems.

Catman
01-13-2003, 07:23 AM
Yes, I knew I had fillrate problems, but this was very strange for me... http://www.opengl.org/discussion_boards/ubb/smile.gif Thanks for the answers.

By the way what can I do to incrase the fillrate?

Coriolis
01-13-2003, 07:57 AM
Nothing, unless you design video cards. Fill rate is a hardware limitation based on the GPU's clock rate and number of pixel pipelines and how many clocks it takes each pipeline to draw a pixel. Well, I guess nothing was a bit too strong, actually... sometimes you can overclock your video card to get a modest fill rate improvement.

All you can do is use the fill rate you have more efficiently, or to use less fill rate. One way is to lower the resolution of the scene. Another is to use front-to-back drawing so that the video card can use its early out based on depth. Sometimes using scissor or stencil can help reduce the amount of fill rate you use.

pbrown
01-13-2003, 04:56 PM
Originally posted by Morglum:
There is nothing astonishing in this. When you rotate the camera, you change the size of the triangles to be drawn and even the number of triangles to be drawn (GL_CULL_FACE is enabled by default in OpenGL).

GL_CULL_FACE is *DISABLED* by default in OpenGL. Maybe if you use a third-party rendering library, it gets enabled "by default", but not in core OpenGL.

Catman
01-14-2003, 04:06 AM
Coriolis: yes, I meant 'how to use the fill rate more efficiently'. But you answered my question anyway, so thanks...