Advertisement

07.22.2008 at 11:54PM PDT, ID: 23587570
[x]
Attachment Details

OpenGL drawing shapes

Asked by glitchized in OpenGL Graphics & Game Programming

Tags:

currently i'm doing a simple paint drawing coding. my knowledge in OpenGL is quite low
I don't really understand the glVertex2d

Like i've attached the code and when i do the checking of the x and y cordinates with my mouse, it displays x = 211
y = 300

how isit link with the -1.0,-1.0?? is it due to the window size?
how do i convert it from 211, 300 to -1.0, -1.0??

and i'm drawing shapes using the mouse like a paint program, do i use glutDisplayFunc() to apply layers??Start Free Trial
1:
2:
3:
glBegin(GL_POINTS);
  glVertex2d(-1.0, -1.0);
    glEnd();
[+][-]07.23.2008 at 05:56AM PDT, ID: 22068708

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: OpenGL Graphics & Game Programming
Tags: C++
Sign Up Now!
Solution Provided By: jgordos
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.23.2008 at 05:58AM PDT, ID: 22068727

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628