View Full Version : No glRotatef/Translatef within glBegin/End?

03-08-2001, 10:59 AM
To simplify my question - is there any way to draw some of the vertexes in a tri/quad, and then call glRotatef before the primitive is finished, to change the positions of the last vertexes.

For example, can I draw the bottom 2 vertexes in a flat quad, and then rotate x degrees using glRotatef, draw the last 2 vertexes, so now the quad is no longer flat?

This could be done using custom transform routines, but I can't be arsed. I would rather have OpenGL do it.

03-08-2001, 11:29 AM
nope..., inside a glBegin/glEnd no way you can use glRotatef , not allowed., but i think you can create your own functions to rotate the vertex, and then just feed the result to glVertex3f.


03-08-2001, 11:48 AM
Thought so. I'm just going to look at the Mesa source now for custom 3D rotation etc.

I think I'll request this feature on the other message board now http://www.opengl.org/discussion_boards/ubb/smile.gif

03-08-2001, 12:42 PM
This sounds like something you could accomplish pretty easily with a vertex program - though the semantics would be different from glRotate,etc.