View Full Version : moving in opengl
sdastagirmca
13th June 2009, 09:34
hi ,
i'm drawing a square in opengl using lines(0,0),(0,10),(10,10)(10,0). A seperate line should be moved from starting point (0,0) to draw like a:confused square.
help me regarding this...
regards
hussain
For basic OpenGL functionality, look here
http://www.glprogramming.com/red
In particular, chapter 2 provides several examples on drawing line primitives.
Best regards,
Mads
sdastagirmca
13th June 2009, 12:21
hi
ex:
I had draw the square using lines..
glBegin(GL_LINES);
//first line
glVertex2f(0, 0);
glVertex2f(0, 0);
//2nd line
glVertex2f(0, 0);
glVertex2f(0,10);
//3rd line
glVertex2f(0,10;
glVertex2f(10,10);
//4th line
glVertex2f(10,10);
glVertex2f(10,0);
glEnd();
I need a ball to move around the square..
my question is how to move the ball or line along the square ....
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.