PDA

View Full Version : FPS problem? What is wrong?



XmVira
01-26-2011, 12:43 PM
I was trying to learn texture mapping. I wrote a little code and i did it, but i have a little problem, FPS. I draw two textures and I got 207 FPS. Then, I draw ten textures and I got 45 FPS(And I want to draw 25 texture at least at the same time :s). Is this normal? I added my code here. Please, take a look and tell me what can I do?
My project on Hotfile (http://hotfile.com/dl/99739427/3aca26b/TextureEx.zip.html)

ZbuffeR
01-26-2011, 12:54 PM
Depends on your videocard, and the quantity of pixels drawn on screen.
What is your hardware ?

XmVira
01-26-2011, 01:03 PM
ATI Mobility Radeon HD 4650 1GB
Intel Core 2 Duo P8700 2.53Ghz
4GB Ram
Windows 7 Ultimate - 64bit
Here this my notebook? :s If this is not enough, I give up. :)

ZbuffeR
01-26-2011, 01:05 PM
And you are certain to run with ATI OpenGL driver, not the Microsoft software implementation ?
What resolution is your rendering and texture surface ?

XmVira
01-26-2011, 01:13 PM
Hmmm! I really don't understand what were you ask?( I am a beginner, so sorry.) However, if you are asking my screen resolution, here it is.

mhagain
01-26-2011, 02:19 PM
That really sounds like you're doing something wrong. Texture mapping is an old old old feature (1995/96!) that definitely does not have this kind of performance impact.

I haven't reviewed your code yet, but I probably will later.

XmVira
01-26-2011, 02:23 PM
Yes. I really don't know Zbuffer you were talking about this WDDM thing? When you said, I did a little search, but I don't understand anything. :) However, I updated my graphics card driver and that thing (WDDM) have gone, and now my problem solved. :D I got 3000 fps with drawing 40 textures. That's make me happy. Thank you very much Zbuffer. I think my problem solved.

_arts_
01-27-2011, 12:51 AM
glGetString (GL_RENDERER);
glGetString (GL_VERSION);

Try this after your window was created, and tell here what you have. Could be a good start.

GuentherKrass
01-27-2011, 02:22 AM
FPS is not a good means of measuring performance since it is non-linear. Compare your frame times instead!
For more on this see, e.g., here (http://www.mvps.org/directx/articles/fps_versus_frame_time.htm)

ugluk
01-27-2011, 03:39 AM
Oh no, you're using a laptop and laptops suck at graphics perf usually. Try a desktop system for development.

I used to have one and tortured it with my GL experiments and
the gfx card (Nvidia 9300M) overheated and broke.

Try to clean your notebook now and then, before the card breaks, the perf usually gets reduced. Otherwise, try to do some batching for perf, use VBO and/or VAO.

But anyway, if 3D games/benchmarks run ok and your app sucks at perf, then chances are you are doing something wrong.

ZbuffeR
01-27-2011, 04:12 AM
ugluk, apparently you did not read XmVira post where he said he fixed the problem by updating the graphic driver.