fixed scaling in opengl
can anyone help me out in scaling of opengl. i am using the glScalef() function to scale polygons but what i want is that the scaling is done 开发者_如何学Con a fixed point but it is not achieved with the following function. can some one put some light on this?
Scaling generally happens around the origin. Therefore, to scale around a point (x,y,z), one must translate the origin, and back.
Specifically:
- translate by (-x, -y, -z)
- scale
- translate by (x, y, z)
Note: it is the very same thing as rotating around a point.
精彩评论