diff options
Diffstat (limited to 'editor/editor.cpp')
| -rw-r--r-- | editor/editor.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp index 4a7cdde..a896cfd 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -30,14 +30,6 @@ const char *dbgCtrl_ClearSelection = "debug-clear-selection"; ThreadPoolHandle threadPoolHandle = ThreadPoolHandle_MAX; -PkeCamera cameraDefault { - .pos = glm::vec3(-40.f, -40.f, -40.f), - .rot = glm::quat(1.f, 0.f, 0.f, 0.f), - .target = glm::vec3(0.f), - .type = PKE_CAMERA_TYPE_PERSPECTIVE, - .orientation = PKE_CAMERA_ORIENTATION_TARGET, - .stale = PKE_CAMERA_STALE_ALL, -}; PkeCamera cameraDbg { .pos = glm::vec3(4.f, 4.f, 4.f), .rot = glm::quat(1.f, 0.f, 0.f, 0.f), @@ -240,8 +232,8 @@ void PkeEditor_Tick(double delta) { if (shouldLockCamera) { shouldLockCamera = false; glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL); - cameraDefault.stale = PKE_CAMERA_STALE_ALL; - ActiveCamera = &cameraDefault; + NullCamera.stale = PKE_CAMERA_STALE_ALL; + ActiveCamera = &NullCamera; } if (pkeSettings.editorSettings.isUsingDebugCamera) { @@ -749,7 +741,12 @@ void PkeEditor_Init() { debugControlsHandle = PkeInput_RegisterSet(debugControlsSet); - ActiveCamera = &cameraDefault; + NullCamera.pos = glm::vec3(-40.f, -40.f, -40.f), + NullCamera.rot = glm::quat(1.f, 0.f, 0.f, 0.f), + NullCamera.target = glm::vec3(0.f), + NullCamera.type = PKE_CAMERA_TYPE_PERSPECTIVE, + NullCamera.orientation = PKE_CAMERA_ORIENTATION_TARGET, + NullCamera.stale = PKE_CAMERA_STALE_ALL, threadPoolHandle = PkeThreads_Init(1, 1); } |
