OpenGL笔记十九之相机系统
------ 2024-10-02 晚上
文章目录
1.运行
1.1.游戏相机
鼠标右键按住可控制旋转
1.2.轨迹球相机
2.游戏相机与轨迹球相机切换
注意代码文件中是拼写错误的GameCameraControl.h,应该是小写g
cpp
#include "application/camera/trackBallCameraControl.h"
#include "application/camera/gameCameraControl.h"
// GameCameraControl* cameraControl = nullptr;
TrackBallCameraControl* cameraControl = nullptr;
cameraControl = new TrackBallCameraControl();
// cameraControl = new GameCameraControl();
3.博主笔记本要运行需要更改的文件
Files 28_OpenGL_CameraSystem/application/Application.cpp and diff_temp/28_OpenGL_CameraSystem/application/Application.cpp differ
Files 28_OpenGL_CameraSystem/application/CMakeLists.txt and diff_temp/28_OpenGL_CameraSystem/application/CMakeLists.txt differ
Files 28_OpenGL_CameraSystem/assets/shaders/fragment.glsl and diff_temp/28_OpenGL_CameraSystem/assets/shaders/fragment.glsl differ
Files 28_OpenGL_CameraSystem/assets/shaders/vertex.glsl and diff_temp/28_OpenGL_CameraSystem/assets/shaders/vertex.glsl differ
Files 28_OpenGL_CameraSystem/CMakeLists.txt and diff_temp/28_OpenGL_CameraSystem/CMakeLists.txt differ