PDA

View Full Version : How do I set the scaling factor back to the original?



jyoung77
04-21-2005, 12:34 PM
Hi,

How do I set the scaling factor back to the original for x, y and z? At a moment, I have lost track of the current combined scaling factor (after several glScalef()'s) in my program. Without knowing the current scaling factor, how do I offset its effect?

Ex. after glScalef(3., 3., 3.) and glScalef(2., 2., 2.), I should call glScalef(1/6., 1/6., 1/6.) to get back to the original. But is there an openGL function to get the factor 1./6.?

Please help. Thanks.

Tony

Bob
04-21-2005, 02:04 PM
Check out what glPushMatrix and glPopMatrix does.