Framerate help!!
My application has a model of about 200polygons and some bitmap fonts on screen printing out the fps and some other information for debugging.
Im getting like 220fps. This is fine, but the com im using to develop this is a P4 2.2ghz with a GF2MX.
On the other hand when i tested this on another com P3 450mhz with a TNT, i was getting 45fps.
Now this application is intended to be a rpg game and out goal for the target machine, the P3 450mhz with the TNT gfx card,is to run at 60fps.
You might say that TNT is a slow card and that 450mhz is a little slow, but i can play CS on it at 800X600 resolution with 72fps. And as far as i know, a single model in CS alone is far more than 200 polygons, let alone the map.
The model being drawn is using vertex arrays and the environment is like to use display lists.
I have enabled Depth Buffering,lighting,texturemapping,back face culling,smooth shading.
[edited by - GamerSg on May 31, 2003 4:01:05 AM]
How do you render your model ? Do you use vertex arrays ?
Making sure your models are cache-friendly would help as well.
Making sure your models are cache-friendly would help as well.
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
I doubt it''s the polygon count, TNT may be a old card, but it was the fastest at it''s time, and i have played many 3d games with thousands of polygons per frame with no lag.
I tried disabling some things and i have come down to 2 things.
1) The font itself.
2) Lighting
If i''m not wrong, T&L is not done by TNT. So this might be a possible cause.
But by not drawing about 20 characters of the font onscreen, framerate jumped back to 120+.It looks like ill have to redo the fonts and use display lists for them.
Being a rpg, there is going to be alot of text onscreen, and i need to make it as fast as i can.Currently im using glutbitmapfonts.I might try rendering them into a display list to see if it helps, or else ill probably have to try some other method. As far as possible, i would like to keep lighting if possible, because i am using light0 and it gives all the objects on screen a nice shade.
I don''t know how to display 2d bitmaps on screen fast.
I would like some opinions from you guys. Which is faster
-drawing a polygon, then mapping the bitmap onto it
-or writing it directly to the frame buffer (If it can be done in OpenGL, i would like to know how as well)
I tried disabling some things and i have come down to 2 things.
1) The font itself.
2) Lighting
If i''m not wrong, T&L is not done by TNT. So this might be a possible cause.
But by not drawing about 20 characters of the font onscreen, framerate jumped back to 120+.It looks like ill have to redo the fonts and use display lists for them.
Being a rpg, there is going to be alot of text onscreen, and i need to make it as fast as i can.Currently im using glutbitmapfonts.I might try rendering them into a display list to see if it helps, or else ill probably have to try some other method. As far as possible, i would like to keep lighting if possible, because i am using light0 and it gives all the objects on screen a nice shade.
I don''t know how to display 2d bitmaps on screen fast.
I would like some opinions from you guys. Which is faster
-drawing a polygon, then mapping the bitmap onto it
-or writing it directly to the frame buffer (If it can be done in OpenGL, i would like to know how as well)
>>I don''t know how to display 2d bitmaps on screen fast<<
Texture mapped quads
About problems with your framerate (on TNT):
- use vertex arrays or VBO for dynamic data
- use display lists or VBO for static data
..
TNT at machine like yours can pust about 1.5MTris/sec..
You should never let your fears become the boundaries of your dreams.
Texture mapped quads
About problems with your framerate (on TNT):
- use vertex arrays or VBO for dynamic data
- use display lists or VBO for static data
..
TNT at machine like yours can pust about 1.5MTris/sec..
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
I''ve had similar trouble, Darkwing is right, use 2d texture fonts, see Nehes lesson 17.
Bitmap fonts are SLOW!!
BTW there are also programs you can download to create a texture
for you from any font installed on your machine. Try google for
''font builder''
Bitmap fonts are SLOW!!
BTW there are also programs you can download to create a texture
for you from any font installed on your machine. Try google for
''font builder''
I''d go for triangle strips with degenerates over quads because cards generally don''t render quads natively.
Why you shouldn''t use iostream.h - ever! | A Good free online C++ book
Why you shouldn''t use iostream.h - ever! | A Good free online C++ book
NEVER USE BITMAP FONTS!!!! I had about 10 FPS with bitmap fonts and about 80 FPS with texture-mapped-2D-Quads-Fonts (
)...
PM
Times change...
Excuse my poor english!

PM
Times change...
Excuse my poor english!
PM Times change...
Excuse my poor english!
Ill check out lesson 17. Thx for the help.
TNT should theoratically be able to push upto 6 million tri/s. But this is definitely an exaggeration just like most hardware manufacturers do. Take the PS2 for example, boasted 75m tri/s.
Until today, few games have reached the 5m/s mark.
So will lighting slow down performance on a TNT? I am only using one light to get the smooth shading. If not, ill have to consider lightmaps, which i have no clue as to how they work.
TNT should theoratically be able to push upto 6 million tri/s. But this is definitely an exaggeration just like most hardware manufacturers do. Take the PS2 for example, boasted 75m tri/s.
Until today, few games have reached the 5m/s mark.
So will lighting slow down performance on a TNT? I am only using one light to get the smooth shading. If not, ill have to consider lightmaps, which i have no clue as to how they work.
May 31, 2003 10:29 PM
Yes, lighting slows down the per-vertex cost on a TNT2, because all per-vertex calculations are done on the CPU.
On TNT2, glLockArraysEXT() is a useful extension that may improve frame rate (when used properly).
Light maps only work when the position of the light AND the position/orientation of the model don''t change; i e, for static world geometry. An alternative to light maps is to feed in vertex colors which are pre-calculated "light" values per vertex.
Putting a typeface in a large texture and then drawing each character as a quad is not great, for many reasons (internationalization, kerning, speed, ...). Draw to a DIBSection using GDI, call GDIFlush() and upload the bitmap to a texture when it changes; then texture one big quad with this texture to show the text.
On TNT2, glLockArraysEXT() is a useful extension that may improve frame rate (when used properly).
Light maps only work when the position of the light AND the position/orientation of the model don''t change; i e, for static world geometry. An alternative to light maps is to feed in vertex colors which are pre-calculated "light" values per vertex.
Putting a typeface in a large texture and then drawing each character as a quad is not great, for many reasons (internationalization, kerning, speed, ...). Draw to a DIBSection using GDI, call GDIFlush() and upload the bitmap to a texture when it changes; then texture one big quad with this texture to show the text.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement