Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Opengl camera control GUI instead of mouse control

  1. #1
    Newbie Newbie
    Join Date
    Apr 2013
    Posts
    1

    Opengl camera control GUI instead of mouse control

    I have tried to find everywhere any information or code on how to implement a GUI in a 3d enviroment to control the camera (zoom, pan, left, right, forward, backward, rotate) just as seen in places like google earth (navigation controls) but i cant find anything at all, could someone help me find resources in implenenting such a feature?

    Thank you.

  2. #2
    Junior Member Newbie
    Join Date
    Mar 2013
    Posts
    16
    While I am fairly new at OpenGL myself, as far as I know OpenGL has nothing to do with how you change/move things in your scene it is only meant to render/draw the scene you give it. I'd assume this type of control would be based in your model update loop just as if you would be directly controlling the camera. But instead you would adjust the scene with input based on your mouse position when you click with your mouse button. As for how you handle this it shouldn't be too hard to create some form of Axis aligned bouding boxes for your buttons (assuming they are rectangular in shape) and then simply finding which box the mouse is above when you click and updating the scene based on that.

    As I said, I am by no means an expert on this stuff so I might be totally off.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    800
    HI,
    I think this page and the reference mentioned on it might help.
    Regards,
    Mobeen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •