suppose i want to draw 2 lines that meets, with an angle of 57 deg between them, how do i code it in opengl? do i need to calculate the actual coordinates/vertexes?
01-01-2004, 11:54 PM
Well, you do need to specify the vertices because OpenGL do not now where you want the lines, you have to say that at a minimum, something like:
glVertex3d( 0, 0, 0);
glVertex3d( 0, 10, 0);
Then you could use:
glRotate( 57, 0, 0, 1);
And then draw same line again and you would get two lines that meet at 0,0,0 and have 57 degrees angle between them.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.