Jump to content
  • Advertisement
Sign in to follow this  
giugio

problem with vbo

This topic is 1036 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello.
I have a camera and i created a system for drawing on the screen the trace of movement of mouse.
The problem is that if i insert in the vbo directly the coords of the mouse of an 800 x 600 window like 172,12,0 ecc..... i see nothing, i must divide the original x and y by a value for see something.
WHy?
i have a camera with a position of 0,0,15 and i set up a prospective projection.
Now the trace of the mouse is far away on the 15 on z is possible to use unproject or something of similar for see the drag of the mose in the real position?
ps. i use glm.
thanks

Share this post


Link to post
Share on other sites
Advertisement

..and perspective projection is going to take your vertices to clip space, then viewport transformed to window coords which is exactly what you are inputting so what exactly do you expect to happen. I suggest you take a more closer look at the graphics pipeline for the API you are using to see how one goes from vertex data input to what you see onscreen.

Share this post


Link to post
Share on other sites

could you give more details? How are you creating your projection matrix? How are you using your projection matrix/vbo data? Have you set the GlViewPort to 800x600? Did you bind the vbo?

Edited by Solid_Spy

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!