How to Rotate an Object on Pivot Point

Hi,
I am new to OpenGL and working on it using VC++.

Normally when I am rotating my object get rotated around an Origin at the Center of the Object/View. I need to change the Origin to Somewhere aka for a cube, at the one corner.

How Can I change my rotation Origin from the center to the Corner?

Thanks in Advance.
Sanjay :slight_smile:
sanjay_singh_1069@yahoo.com

for example:

glTranslatef(ox, oy, oz);
glRotatef(45.0, 0.0, 0.0, 1.0);
glTranslatef(-ox, -oy, -oz);

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.