speed: glRotatef vs. glMultMatrix

Started by
12 comments, last by Halma 18 years, 6 months ago
Actually, here's some ASCII art to demonstrate what I'm talking about.
\                    / \             ___  /  \             |  /   \              /    \            /     \__________/      \        /       \      /        \    /         \  /          \/


Here's a particle (with normal) facing the near plane as your method would produce. However, it isn't facing the camera, so it would become skewed from the perspective projection.
If at first you don't succeed, redefine success.
Advertisement
But this is the same effect on everything else in the scene, including straight walls and the like. The effect is almost non existant... unless you are using some kindof odd FOV/Aspect?
Quote:Original post by Vampyre_Dark
But this is the same effect on everything else in the scene, including straight walls and the like. The effect is almost non existant... unless you are using some kindof odd FOV/Aspect?


Granted, however, walls and the like are apart of the normal scene (as in, they aren't supposed to look the same from all directions) - and thus must be transformed as so. Particles (billboarded) need to always face the camera, such that they always look the same from every angle. This isn't the case if you just make the particle point at the -normal of the near plane. Still, your method of billboarding, while less accurate, would be faster - by what margin however is hard to say.
If at first you don't succeed, redefine success.
Quote:Original post by Vampyre_Dark
Quote:Original post by Code-R
the "facing the screen" part ;)
If the quads are always meant to be facing the screen, simply translating to their location and drawing a quad is enough. There is nothing to rotate. They already face the screen.


Am I missing something? These are in a 3D view, not a 2D orthographic projection. Even if I want to do it the easy way and have everything parallel to the near clipping plane, I'd still have to draw them so that they're perpendicular to the look direction.

This topic is closed to new replies.

Advertisement