Undoubtedly shonky.

Started by
28 comments, last by Cirian 21 years, 10 months ago
quote:
Remember the image is being drawn 500 times, if that makes any difference.

No If you use a higher texture resolution, then it will get slower (due to cache misses), but a 64² texture is virtually nothing for a 3D card. I would expect a larger performance drop when going from 32² to 2048², but not in his case. It will of course affect fillrate, but since his app is far from being fillrate limited, the problem is somewhere else.
Advertisement
Umm.. here is some alarming evidence that would _suggest_ the app is fillrate limited:

500 objects (quads) are being drawn. Four tests are shown here, each with exactly the same number of objects, calculations, etc. The only difference is tests 2 and 3 have a call to glScale(4.0f); and tests 3 and 4 use a texture with transparency. Frame rate is measured here in Hz.

1.
tex => flame.bmp (square image, no transparency)
size => 16x16
Hz: 134

2.
change size => 64x64
Hz: 34

3.
change tex => lumiere2.png (square image, with transparency)
change size => 16x16
Hz: 127

4.
change size => 64 64
Hz: 30


Is this much of a jump _really_ to be expected?
We also completely converted the Particle Arrays to use glInterleavedArrays / glDrawElements. Our framerate is identical to immediate mode. To see if there was a bottleneck within the particle update calculations, I disabled updates after 200 frames. The framerate changed marginally, getting us an extra two fps when no operations are performed other than the glDrawElements code.

[edited by - Cirian on June 18, 2002 3:58:29 AM]
Are you using lighting? If so, turn it off to see what happens.

---
Make it work.
Make it fast.

"Commmmpuuuuterrrr.." --Scotty Star Trek IV:The Voyage Home
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
Nope, no lighting.
I remember that a friend of mine mentionned he had horrible FPS in a similar projects because Quads werent HW accelerated on his card. Might want to check that out.
Are you calculating your fps correctly?
quote:Original post by ANSI2000
Are you calculating your fps correctly?


LOL...that would be the funniest thing ever, but I doubt it, as anyone can tell what 20 fps looks like -- HORRIBLE, among other reasons.
The frames per second is simply a counter that increases once per frame, and then if 1000 mseconds have passed, it saves that result as the current Hz and resets the counter. Very simple stuff, but easy to implement.

EDIT: oh, and converting from Quads to Triangle Fans or Triangle Strips did not result in any change in frame rate.

[edited by - freshya on June 18, 2002 8:16:35 PM]
There is also a second counter that logs *all* the frames rendered and divides it by the uptime when the app closes.

This topic is closed to new replies.

Advertisement