View Full Version : FPS, Clipping, ....
03-21-2001, 12:13 PM
I'm currently working at a 3d-engine in opengl. i'm currently able to load scenes that i've exported through my own exporter in 3dsmax. i'm also able to fly through the world by using my mouse. but: why do i have a constant framerate, not important where im standing and where i'm looking at? do i have to code clipping functions myself?
You should definitely don't need to do your own clipping. What you can do is to remove objects that aren't visible at all, i.e. outside the viewfrustum. Look for some tutorials on frustum culling.
As for framerate, you just say your framerate is constant, but not what framerate you get. If you get constant framerates at about 60, 75 or 85 fps, you are probably limited by the vertical retrace of your monitor, and there should be an option in the drivers settings to disable this if you really want to do this.
03-23-2001, 08:10 AM
thanx for your reply. If the framerate would be high enough, it wouldn't be a problem. No, i get about 15 fps in a scene with about 15.000 polygonsm, that's not really much. My computer is a duron 1000 cpu with a geforce 2 mx, in 3d mark 200 i get >5400 3d marks.
How are you creating this number?
Are you resetting the frames displayed and elapsed time to 0 every so often.
If the program has been running for lets say 30 seconds and it has averaged 15 FPS so far... adding the frames that you recieved in the 31st second, even though it was at 60 frames for that second will not affect the FPS average. You may want to try to reset the frames and the elapsed time back to 0 every 5 seconds or so to obtain a accuate count at that moment in time.
Hope this helps.
03-23-2001, 09:15 AM
You should get more than 15 fps with 15000 polygons!!
I've only got a pentium 200 with a Geforce 2 MX using the PCI bus and I can get over 30 fps with 10000 polygons and dynamic environmental cube mapping, and even then most of my performance is lost due to the lack of bandwidth across the bus.
Do you make the most of hardware T&L, like using indexed vertex arrays etc?
Do you make sure you bind your textures?
03-23-2001, 09:32 AM
This sounds like a similar problem I had with my landscape engine (well still have). I got about 10 fps when displaying 10,000 tris textured and smooth shaded (I made a color/bump map in paint shop pro) I found I was getting > 60 fps after clipping the quadtree and all transformations and the skybox but with out drawing the landscape. As soon as I did I only got 10fps. I do `only` have a tnt2m64 32mb, p3 600 and 128MB but this was still disapointing. I was going to ask on this forum but I decided to work on my level editer. Well I have asked it, so is there any main reason why it should be slow or is this an ok speed for my comp and a barely optermised home made program. I must be using hardware acceleration so I don't know what is wrong.
03-24-2001, 02:02 AM
my fps counter is ok I think. also, textures are binded. i've programmed frustum clipping now, that works quite well. but what are indexed vertex arrays? i'm currently rendering every single polygon with a call to glxxxx, for texture uv, color and so on. I always wanted to know how to speed that up. how can i use those indexed vertex arrays in opengl. the only one documentation i have is msdn, not really the best documentation for those things i think.
In the MSDN there are also Vertex Arrays, just look for the function glDrawElements.
It describes the use of indexed vertex arrays.
On left corner of this page, there are the opengl.org quick links, there is something called "Extensions", there you can find all the extensions to opengl. They are additional features added by different Hardware Vendors. some of them like vertex arrays have become standard in opengl 1.2.
There is of course only the specification of the functions there. you might have to search for some tutorials somewhere else.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.