Advertisement

Object distance

Started by December 28, 2000 06:17 PM
7 comments, last by penetrator 23 years, 11 months ago
Another newbie question: I noticed that if I draw an object after glTranslatef (0.0f, 0.0f, 5.0f); I get about 50.0 fps (the object is "far away" from the camera point of view) if I glTranslatef (0.0f, 0.0f, 0.1f); FPS drop at around 30.0 !!! Is there an explanation for it ? (Yes perhaps I''m stupid ...
well, just a guess, but do you think it is faster to draw small or big polygons? Should be small, so if they are furhter away, they are smaller and faster. But I imagine you must have a quite a few polygons to get such a drop - perhaps at a distance many of them are shrinking away to nothing?

HTH

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!
Advertisement
"But I imagine you must have a quite a few polygons to get such a drop"

doesnt have to be many at all one is enuf eg

1/ glTranslatef (0.0f, 0.0f, 0.1f);
the polygon covers 100000pixels on the screen

2/ glTranslatef (0.0f, 0.0f, 5.0f);
the polygon covers 10pixels on the screen

also if youre using mipmapping the first could be using a texture of 256x256 and the second one of 64x64.

http://members.xoom.com/myBollux
About triangle sizes.
There''s no matter how large is the triangle and how much pixels it covers, modern 3D hardware has no any perfomance falls at all. In most cases fill rate is mesured in tringles per sec. Actualy, this bottleneck is the OpenGL itself, since if you''d tested your large triangles in, for example, Glide or any other low level API, you''ll not notice any difference between small and large triangles.
gee forcecoder, thats interesting, i''m suprised they haven''t made infinite resolution displays to go with our video cards only limited in speed by polygons... does that mean that 2d games at any resolution can run at ###########################################################################fps if the monitor supports it? :p

-mike
and then which is the right answer ?

Advertisement
I think the right answer is that you has missed something in your init code and has no hardware support.
The fps you got is just silly.
ok, but please tell me then how should look like and initGL routine which enable the hardware ...
I copied it from nehe tutorials and I think I''m using hw acceleration, but being a newbie now you put doubts in my mind ... please help me ...

If you have not changed the init code should it be OK. From which tutorial did you take it?
Another trap can be how you use textures. If you disable texturing what happens to your performance (in exact numbers) ?

I guess you have played some 3d games so you know that the hardware is OK. The best would be if you could give a source example and the fps you got.

This topic is closed to new replies.

Advertisement