Jump to content
  • Advertisement
Sign in to follow this  
greentea8202

OpenGL rubberband box in 3d win & lighting

This topic is 5143 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

Hi, It could be very basic question, but I am implementing something like rubberband box. I saw some example code online but I didn't really understand what it was doing. So what I found was a method to unproject to the near plane(z = 0) and get 3d pts for 4 corners of the window coordinate as I drag the mouse. Is this ok? or Is there any better way to do implement this??? Also about the lighting, I'm using fltk Fl_Gl_Window routine, and my init(), which has all the viewport / matrices / lighting set up is called only there is any change in window size or anything. When I do mouse manipulation on the objects, it seems ok just calling init() once before draw, but if I do selection using mouse (using openGL namestack), I get the black screen ("no objects showing") as soon as I click. But if have init() call every single time I draw, I do not get this problem. Does anyone know what would cause this problem if I call init only once???? Thanks!!!!

Share this post


Link to post
Share on other sites
Advertisement
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!