A simple OpenGL code to load obj models, with features to rotate the camera and rotate the light source.
- Microsoft Visual Studio 2019 Community Edition
The dependencies are packed in the Dependencies/
directory, which we include the following libraries:
Simply open the 3DMesh.sln
file in Visual Studio to open the project.
As long as OpenGL is configured on your PC (which is usually installed along with Microsoft Visual Studio), it should run without problems.
Press <Ctrl> + <F5>
to build without debugging.
To rotate the camera, first change the rotation mode to camera mode by pressing <F1>
.
Then, drag on the screen to rotate the camera.
You may zoom in and zoom out by scrolling.
To rotate the light source, change the rotation mode to light source mode by pressing <F2>
.
Then, drag on the screen to rotate the light source.
You may change the distance of the light source by scrolling.