View Full Version : about graphics transform
04-21-2005, 04:12 PM
I use the glOrtho() or glScaled() to accomplish the function of zoom, when zoom out a certain extent, the change of the graphics become slowly .why? and how can I solve it?
You say "when zoomed out" rendering gets slow.
Maybe that's not what you meant, but if it is, maybe it's because you're rendering a lot of stuff and your card is fill-rate limited?
Or maybe you're not using mipmaps for your textures?
Some things you can do to speed up rendering of lots of small things:
1. Render your objects front to back. (use qsort to sort the objects based on distance from the camera)
2. Use mipmaps for your textures.
3. use lower levels of detail on objects that are further away (or, as in your situation, are drawn smaller).
04-21-2005, 11:44 PM
Scale is linear, and remember the "d" in glScaled just means use ints.
You probably need to scale your scale if you know what I mean. i.e. your scale value should be some log of your zoom factor.
One way to do this is to multiply a scale value by a fixed ammount. So zooming out I'd multiply a fixed scale value by 0.5 and apply it. I could zoom in by multiplying by 2. This would always give a similar rate in the change in the magnitude of your scale and be more like what you expect to see.
Make sure you're applying scale on your modelview matrix and make sure that you're using a floating point glScalef.
04-21-2005, 11:53 PM
Ahh, reading the other reply I now realized that you might be talking about frame rate, certainly this could be caused bt the texture filtering mentioned by T101, I just assumed you meant rate of motion rather than frame rate.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.