A simple OpenGL-based camera class

I am looking for a simple but complete implementation (library) of the camera for OpenGL. My use case is three-dimensional models, which I visualize in abundance. But my current camera implementation is a bit buggy.

After googling, I found several implementations, such as those that were found in NeHe, but they do not have all the functions that I perform for them, in particular:

  • Left right
  • Strafe
  • Rotation around the view axis
  • Arbitrary translation of the viewpoint

Any DirectX solutions that can be easily converted to OpenGL will also be evaluated.

+6
source share
2 answers

Since I'm not sure about the question, I'm going to tentatively answer my lesson:

http://www.opengl-tutorial.org/beginners-tutorials/tutorial-6-keyboard-and-mouse/

(source code here )

Hope this helps. If this does not completely satisfy your needs, do not hesitate to explain what exactly is wrong, and I will edit my post.

+2
source

Source: https://habr.com/ru/post/888372/


All Articles