Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualjbadams

Posted 15 February 2013 - 04:19 AM

How can I track the mouse cursor position and then draw a line at that exact location?

I tried to do this myself by using glUnProject(); and store the 3 last values and use them as position for the glVertex3f(); vertex positioning obviously that didn't work it would draw the line but not at the exact location of the cursor or close enough that it wasn't noticeable after running the program.

So I was trying to deciper a way to do it and I'm 100% honestly stumped....


So in other words if someone knows how to do this feel free to tell me how you did it smile.png

OpenGL 3.0
WIN32 API
C++


Thanks in Advance

: Fixed tags.


#6DarkHorseKnight

Posted 22 May 2012 - 01:38 PM

How can I track the mouse cursor position and then draw a line at that exact location?

I tried to do this myself by using glUnProject(); and store the 3 last values and use them as position for the glVertex3f(); vertex positioning obviously that didn't work it would draw the line but not at the exact location of the cursor or close enough that it wasn't noticeable after running the program.

So I was trying to deciper a way to do it and I'm 100% honestly stumped....


So in other words if someone knows how to do this feel free to tell me how you did it Posted Image

OpenGL 3.0
WIN32 API
C++


Thanks in Advance

#5DarkHorseKnight

Posted 22 May 2012 - 01:37 PM

How can I track the mouse cursor position and then draw a line at that exact location?

I tried to do this myself by using glUnProject(); and store the 3 last values and use them as position for the glVertex3f(); vertex positioning obviously that didn't work after running the program.

So I was trying to deciper a way to do it and I'm 100% honestly stumped....


So in other words if someone knows how to do this feel free to tell me how you did it Posted Image

OpenGL 3.0
WIN32 API
C++


Thanks in Advance

#4DarkHorseKnight

Posted 22 May 2012 - 01:37 PM

How can I track the mouse cursor position and then draw a line at that exact location?

I tried to do this myself by using glUnProject(); and store the 3 last values and use them as position for the glVertex3f(); vertex positioning obviously that didn't work after running the program.

So I was trying to deciper a way to do it and I'm 100% honestly stumped....


so if someone knows how to do this feel free to tell me how you did it Posted Image

OpenGL 3.0
WIN32 API
C++


Thanks in Advance

#3DarkHorseKnight

Posted 22 May 2012 - 01:36 PM

How can I track the mouse cursor position and then draw a line at that exact location?

I tried to do this myself by using glUnProject(); and store the 3 last values and use them as position for the glVertex3f(); vertex positioning obviously that didn't work so I was trying to deciper a way to do it and I'm 100% honestly stumped....


so if someone knows how to do this feel free to tell me how you did it Posted Image

OpenGL 3.0
WIN32 API
C++


Thanks in Advance

#2DarkHorseKnight

Posted 22 May 2012 - 01:36 PM

How can I track the mouse cursor position and then draw a line at that exact location?

I tried to do this myself by using glUnProject(); and store the 3 last values and use them as position for the glVertex3f(); vertex positioning obviously that didn't work so I was trying to deciper a way to do it and I'm 100% honestly stumped....


so if someone knows how to do this feel free to tell me how you did it Posted Image

OpenGL 3.0
WIN32 API
C++


Thanks in Advance

PARTNERS