From aefe55e31474c685d6b6606183bb7038118781ac Mon Sep 17 00:00:00 2001 From: benkyd Date: Wed, 11 May 2022 13:36:24 +0000 Subject: [PATCH] ok epic --- CMakeLists.txt | 5 +++++ src/Rendering/mesh.hpp | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d42e861..4ae3d52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ add_definitions(-DMC_RESOURCES="${CMAKE_SOURCE_DIR}/resources/") message(${CMAKE_SOURCE_DIR}/resources) if (UNIX) + find_package(glm REQUIRED) find_package(SDL2 REQUIRED) endif(UNIX) @@ -27,6 +28,9 @@ if (WIN32) endif (WIN32) set(THREADS_PREFER_PTHREAD_FLAD ON) + +set(OpenGL_GL_PREFERENCE GLVND) + find_package(Threads REQUIRED) find_package(OpenGL REQUIRED) @@ -58,6 +62,7 @@ set_target_properties(${executable} PROPERTIES if (UNIX) target_link_libraries(${executable} SDL2 + glm OpenGL::OpenGL OpenGL::GL Threads::Threads diff --git a/src/Rendering/mesh.hpp b/src/Rendering/mesh.hpp index 7aea96a..7817568 100644 --- a/src/Rendering/mesh.hpp +++ b/src/Rendering/mesh.hpp @@ -1,6 +1,8 @@ #ifndef MINECRAFT_RENDERING_MESH_H_ #define MINECRAFT_RENDERING_MESH_H_ +#include "../common.hpp" + class Vertex { public: @@ -14,7 +16,7 @@ class Mesh public: Mesh(); - + private: GLuint mVAO;