Are there any easy ways to generate OpenGL code for drawing shapes from a GUI?

Posted by Sam152 on Stack Overflow See other posts from Stack Overflow or by Sam152
Published on 2010-01-28T15:08:30Z Indexed on 2010/03/28 20:03 UTC
Read the original article Hit count: 254

Filed under:
|
|

I have enjoyed learning to use OpenGL under the context of games programming, and I have experimented with creating small shapes. I'm wondering if there are any resources or apps that will generate code similar to the following with a simple paint-like interface.

glColor3f(1.0, 0.0, 0.0);
glBegin(GL_LINE_STRIP);
glVertex2f(1, 0);
glVertex2f(2, 3);
glVertex2f(4, 5);
glEnd();

I'm having trouble thinking of the correct dimensions to generate shapes and coming up with the correct co-ordinates.

© Stack Overflow or respective owner

Related posts about opengl

Related posts about c++