View Full Version : Rotation of vertices

Cucus

05-20-2011, 11:04 AM

Hi,

I know that there's functions to make modify (translate,rotate and scale) of openGL matrix.

But can we use these function to do the same for another matrix? If I want to rotate a vertex(all vertices of an object ofc), can I use glRotate?

Thanks.

BionicBytes

05-20-2011, 05:23 PM

If I want to rotate a vertex(all vertices of an object ofc), can I use glRotate?

You can use glRotate to build a matrix if you wish. It's not the only way but you can do it.

To rotate all your certifies you multiply each one by the matrix and the result is a rotated vertex.

V-man

05-21-2011, 06:15 AM

I think he is asking if he can use glTranslate, glRotate, glScale, glFrustum, glOrtho on the other matrices like projection or texture or color matrix.

Yes you can.

However, this is old OpenGL and you should move into shaders already since it is 2011. The matrices no longer exist and neither does glTranslate.

http://www.opengl.org/wiki/FAQ#glTranslate.2C_glRotate.2C_glScale

BionicBytes

05-21-2011, 06:26 AM

The matrices no longer exist and neither does glTranslate.

...I'll just add that's true when you opt to use the core profile context.

In the compatability context they still exist.

Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.