summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/Game.cpp4
-rw-r--r--src/Input.hpp1
-rw-r--r--src/Render.hpp2
-rw-r--r--src/Util/ImageViewer.cpp2
-rw-r--r--src/main.cpp1
6 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5117ea3..a4cf912 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 # Enable assertions for RelWithDebInfo builds.
 string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
 
-set(GLEW_USE_STATIC_LIBS ON)
+if (NOT UNIX)
+    set(GLEW_USE_STATIC_LIBS ON)
+endif (NOT UNIX)
 
 find_package(glfw3 3.3 REQUIRED)
 find_package(GLEW REQUIRED)
@@ -93,7 +95,7 @@ if (WIN32)
     set(LINK_FLAGS "-static-libgcc -static-libstdc++ -static -mwindows")
 endif (WIN32)
 
-target_link_libraries(meowcraft PRIVATE glfw GLEW::glew_s OpenGL::GL ${LINK_FLAGS})
+target_link_libraries(meowcraft PRIVATE glfw GLEW::GLEW OpenGL::GL ${LINK_FLAGS})
 
 function(make_includable input_file output_file)
     file(READ ${input_file} content)
diff --git a/src/Game.cpp b/src/Game.cpp
index dd04b2f..6c6df7c 100644
--- a/src/Game.cpp
+++ b/src/Game.cpp
@@ -50,14 +50,14 @@ void Game::run() const {
         for (auto chunk : world.get_visible_chunks(time, camera.position())) {
             auto position = chunk->chunk.value().position();
             actions.add({
-                .program = GFX::Resources::Program::Terrain,
                 .mesh = &chunk->land_mesh.value(),
+                .program = GFX::Resources::Program::Terrain,
                 .transform = Transform(position),
             });
 
             actions.add({
-                .program = GFX::Resources::Program::Terrain,
                 .mesh = &chunk->water_mesh.value(),
+                .program = GFX::Resources::Program::Terrain,
                 .transform = Transform(position - Vec3{0, 0.2, 0}),
                 .alpha = 0.4,
             });
diff --git a/src/Input.hpp b/src/Input.hpp
index 683ee55..b6f24b6 100644
--- a/src/Input.hpp
+++ b/src/Input.hpp
@@ -1,5 +1,6 @@
 #pragma once
 
+#include <memory>
 #include "Time.hpp"
 #include "Common/Casts.hpp"
 #include "Common/Sizes.hpp"
diff --git a/src/Render.hpp b/src/Render.hpp
index 6b7cb65..09c6fee 100644
--- a/src/Render.hpp
+++ b/src/Render.hpp
@@ -1,7 +1,7 @@
 #pragma once
 
 #include <condition_variable>
-#include "Defines.hpp"
+#include <mutex>
 #include "Common/Sizes.hpp"
 #include "GFX/Actions.hpp"
 #include "GFX/Camera.hpp"
diff --git a/src/Util/ImageViewer.cpp b/src/Util/ImageViewer.cpp
index 05d316c..abb22d4 100644
--- a/src/Util/ImageViewer.cpp
+++ b/src/Util/ImageViewer.cpp
@@ -6,8 +6,8 @@ void ImageViewer::render(GFX::Actions& actions) {
     // TODO: Re-add texture support
     // TODO: Add orthographic camera support
     actions.add({
-        .program = GFX::Resources::Program::ImageViewer,
         .mesh = &m_mesh,
+        .program = GFX::Resources::Program::ImageViewer,
         .transform = Transform(),
     });
 }
diff --git a/src/main.cpp b/src/main.cpp
index 94061f1..737c045 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2,6 +2,7 @@
 #include <GL/glew.h>
 #include <GLFW/glfw3.h>
 
+#include "Defines.hpp"
 #include "Game.hpp"
 #include "Render.hpp"
 #include "ThreadRole.hpp"