Advertisement

Speed things up

Started by January 04, 2001 06:07 AM
11 comments, last by devil 23 years, 10 months ago
I noticed that the NeHe Base Code is quite slow Is there a way to speed the things up ???? I use it to create a First person game, but i just get 13 FPS with as little a 100 Polygones on the screen on a Voodo 3, and thats realy not much !
If you are talking about NeHe Base Code will probably most people think about the code for setting up windows with OpenGL. Your code runs slow because you do not get hardware support.

Have you check that you are using 16 bit color depth?
Advertisement
Can''t understand !!! Nehe code doesn''t enable hardware support ? And how must it be enabled then ?

hardware support is automatic - if you''ve got a card, then its already enabled.

some things that may screw you up is if your card is not set up properly or windows has not had hardware acceleration turned on (if your problem is accelerated-related).
another thing to look for is applications running in the background (if you have an anti-virus program set up, shut it down -- those things are pigs on resources).
or, barring any kind of outside interference - it is running slow due to the way the program is designed. keep in mind that the tutorials are designed to teach a specific topic, and speed optimization may not be the forefront of the lesson. bear in mind that if you have 100 objects, and if you don''t have any kind of culling (or speed optimization on your part) involved, you may be drawing 100 objects regardless of the fact they are in the viewing area.

as far as the base code itself, you can''t get it to go any faster (well, maybe you can), but speed is definately slowed more through rendering of objects rather than the implementation of the windows code.
The main fact thats strucks my is if I remove all parts of the drawing Code but the function to draw the FPS rate, i still have around 35 fps, and that while he is doing nothing at all !
Im not sure how NeHe tutorials create their textures for the fonts. My guess is that they use one texture for each letter printed. This means there are alot of texture-switching going on if you update the FPS constantly. I have had the same problem on another project. Try to change the text-drawing routines so that they create one large texture with all the text on it and then display that texture onscreen.
Advertisement
that seems odd...
my windows code follows the same basis as nehe''s (rendering and other opengl code within the message pump rather than the wndProc) and i get at least 120 fps running fullscreen at 640x480 (although i''ve haven''t put that many objects in it).

waitaminute! if you have a voodoo III (as i do) and you are using the font code that nehe provides, it doesn''t work that great in fullscreen. i ran the bitmap font tutorial (i forget which lesson number) and it worked fine in windowed mode, but when it came to fullscreen, it bogged right down. actually, i was lucky if the thing ran at 2fps and the font never showed up correctly (it was all distorted). try running in windowed mode to see if the speed increases to at least 100. if it works, there is something up with the card (i don''t know what it is, but i know that i am not the only one, someone else on the opengl board experienced the same problem).

if this is the case, let me know. i got the font working on my program, i''ll just have to double-check to see the differences between it and nehe''s stuff and i''ll be able to pass it on.
I think you might not be getting hardware support because of driver problems. I mean no offense to you, but 3DFX cards suck donkey balls. There are drivers for OpenGL, but they are notoriously known for bugs, and glitches.(most of wich involve loss of hardware support) I myself had a 3dfx based card for a while, and when I intalled the drivers that came with it, no opengl hardware support was available. Then I went on the net, got another set of drivers, and some hardware support was given. But then when I got the most rescent drivers, I got no hardware support again. I decided to get myself a card with reliavle support for opengl. I reccomend anything by NVIDIA. A Geforce 2 mx is going for around $85 + shipping. Look on www.pricewatch.com, under the video card section for more info.
Hope I what I said helped.

The Kid

I don''''t know what the future holds, but I know who holds the future.
I don''t know what the future holds, but I know who holds the future.
I have a voodoo3 2000 and an nvidia geforce2 mx! The voodoo suffers a problem in relation to the way nehe does text the geforce does not. You will most likely get distorted text and VERY low frame rates in fullscreen. in windowed mode the text will work but the hardware acceleration of the card is severly hampered so your overall frame rate will be low compared to other cards (the card was designed for fullscreen use). in the end if your using nehe''s text on a voodoo3 your pretty much (pardon my american) "fucked!"
As for overall framerates....
The box on the v3-2k say''s 6m tri''s per second but I''ve only every gotten about 2M tri''s per second fullscreen and 100-200k tri''s per second from one of my programs
I haven''t had my nvidia card very long (about a week) but I''d say those numbers on my card are more like 5M fullscreen and 2M windowed. With a lot better H/W support for features (exspecially stencile buffer) so they don''t drag down performance.

l8r,
Rob
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
OK, so in order to get the code run fast I have to change the letter writing code,

to be clear : I myself have a Geforce and it runs smoothly with around 120 FPS (K7-550), but on other PC with better Hardware and the same drivers it runs slower (e.g. 50 FPs on a Geforce with a K7-900) and its especialy slow on a Voodoo 3 (30 FPS on a K7-1GH), and this is quite crazy, espacialy according to the fact that if i turn the FPS writung on, but write it to a file when leaving the game instead, the FPS rate doesn''t get higher
then 33 FPS on this Voodoo 3 PC

This topic is closed to new replies.

Advertisement