From f57c972be07aa9399397470a94c4faf01845ef1d Mon Sep 17 00:00:00 2001 From: elipzer Date: Mon, 10 Sep 2018 11:35:02 -0400 Subject: [PATCH] Working on Model-to-World Matrices Currently, this feature breaks a bunch of stuff :(. Have to get poseable to work with the objects. --- OpenGLEngine/Application.cpp | 9 ++--- OpenGLEngine/Exception.cpp | 14 ------- OpenGLEngine/Exception.h | 14 ++++--- OpenGLEngine/GLFWInputManager.cpp | 2 +- OpenGLEngine/MeshFactory.h | 10 ++--- OpenGLEngine/My3DScene.cpp | 47 ++++++++++++++--------- OpenGLEngine/MyBatch.cpp | 17 ++++---- OpenGLEngine/MyBatch.h | 10 +++-- OpenGLEngine/MyBatchTestVertexShader.glsl | 6 +-- OpenGLEngine/MyObjectOrientedScene.cpp | 33 ++++++++++------ OpenGLEngine/OpenGLEngine.vcxproj | 1 - OpenGLEngine/OpenGLEngine.vcxproj.filters | 3 -- OpenGLEngine/Poseable.h | 8 ++-- OpenGLEngine/Util.cpp | 11 +++++- OpenGLEngine/Util.h | 5 +++ OpenGLEngine/main.cpp | 4 +- OpenGLEngine/stdafx.h | 3 +- 17 files changed, 111 insertions(+), 86 deletions(-) delete mode 100644 OpenGLEngine/Exception.cpp diff --git a/OpenGLEngine/Application.cpp b/OpenGLEngine/Application.cpp index 6a947f7..642e255 100644 --- a/OpenGLEngine/Application.cpp +++ b/OpenGLEngine/Application.cpp @@ -2,6 +2,8 @@ #include "Exception.h" +#include "Util.h" + Application::Application(int width, int height) : m_screen_size(width, height) { @@ -52,7 +54,6 @@ int Application::run() try { init(); - GLenum gl_err; while (!glfwWindowShouldClose(m_p_window)) { // Handle all messages @@ -62,11 +63,7 @@ int Application::run() clock_t clock = m_fps.get_clock(); update(delta_time, clock); render(); - gl_err = glGetError(); - if (gl_err != GL_NO_ERROR) - { - throw EXCEPTION("Caught OpenGL Error: " + std::to_string(gl_err)); - } + CHECK_GL_ERR(); glfwSwapBuffers(m_p_window); } diff --git a/OpenGLEngine/Exception.cpp b/OpenGLEngine/Exception.cpp deleted file mode 100644 index b5877a5..0000000 --- a/OpenGLEngine/Exception.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "Exception.h" - -Exception::Exception(const std::string& message, const std::string& class_name) - : m_message(message), m_class_name(class_name) {} - -const std::string& Exception::get_message() -{ - return m_message; -} - -const std::string& Exception::get_class_name() -{ - return m_class_name; -} \ No newline at end of file diff --git a/OpenGLEngine/Exception.h b/OpenGLEngine/Exception.h index 7635dd6..cdc1447 100644 --- a/OpenGLEngine/Exception.h +++ b/OpenGLEngine/Exception.h @@ -3,17 +3,21 @@ #include // TODO: This MUST be changed to something less generic -#define EXCEPTION(message) Exception(message, typeid(*this).name()) +#define EXCEPTION(message) Exception(message, __FILE__, __LINE__) class Exception { public: - Exception(const std::string& message, const std::string& class_name); + Exception(const std::string& message, const std::string& file_name, int line) + : m_message(message), m_file_name(file_name), m_line(line) + {} - const std::string& get_message(); - const std::string& get_class_name(); + const std::string& get_message() { return m_message; } + const std::string& get_file_name() { return m_file_name; } + int get_line() { return m_line; } private: std::string m_message; - std::string m_class_name; + std::string m_file_name; + int m_line; }; \ No newline at end of file diff --git a/OpenGLEngine/GLFWInputManager.cpp b/OpenGLEngine/GLFWInputManager.cpp index a2e7fb4..65ad5da 100644 --- a/OpenGLEngine/GLFWInputManager.cpp +++ b/OpenGLEngine/GLFWInputManager.cpp @@ -29,6 +29,6 @@ void GLFWInputManager::key_callback(GLFWwindow* p_window, int key, int scancode, input_manager.key_up(key); else if (action == GLFW_REPEAT) { /* Ignored */} else - throw Exception("Invalid GLFW Key Action: " + std::to_string(action) + " (" + std::to_string(scancode) + ")", "class GLFWInputManager"); + throw EXCEPTION("Invalid GLFW Key Action: " + std::to_string(action) + " (" + std::to_string(scancode) + ")"); } diff --git a/OpenGLEngine/MeshFactory.h b/OpenGLEngine/MeshFactory.h index bb8960b..4caa461 100644 --- a/OpenGLEngine/MeshFactory.h +++ b/OpenGLEngine/MeshFactory.h @@ -50,7 +50,7 @@ public: case DrawMode::DRAW_TRIANGLES_ADJACENCY: case DrawMode::DRAW_PATCHES: default: - throw Exception("Unable to gen for current draw mode: " + std::to_string(draw_mode), "class MeshFactory"); + throw EXCEPTION("Unable to gen for current draw mode: " + std::to_string(draw_mode)); } } @@ -78,7 +78,7 @@ public: case DrawMode::DRAW_TRIANGLES_ADJACENCY: case DrawMode::DRAW_PATCHES: default: - throw Exception("Unable to gen for current draw mode: " + std::to_string(draw_mode), "class MeshFactory"); + throw EXCEPTION("Unable to gen for current draw mode: " + std::to_string(draw_mode)); } } @@ -108,7 +108,7 @@ public: case DrawMode::DRAW_TRIANGLES_ADJACENCY: case DrawMode::DRAW_PATCHES: default: - throw Exception("Unable to gen for current draw mode: " + std::to_string(draw_mode), "class MeshFactory"); + throw EXCEPTION("Unable to gen for current draw mode: " + std::to_string(draw_mode)); } } @@ -152,7 +152,7 @@ public: case DrawMode::DRAW_TRIANGLES_ADJACENCY: case DrawMode::DRAW_PATCHES: default: - throw Exception("Unable to gen for current draw mode: " + std::to_string(draw_mode), "class MeshFactory"); + throw EXCEPTION("Unable to gen for current draw mode: " + std::to_string(draw_mode)); } } @@ -182,7 +182,7 @@ public: case DrawMode::DRAW_TRIANGLES_ADJACENCY: case DrawMode::DRAW_PATCHES: default: - throw Exception("Unable to gen for current draw mode: " + std::to_string(draw_mode), "class MeshFactory"); + throw EXCEPTION("Unable to gen for current draw mode: " + std::to_string(draw_mode)); } } diff --git a/OpenGLEngine/My3DScene.cpp b/OpenGLEngine/My3DScene.cpp index f3d4239..22d4bff 100644 --- a/OpenGLEngine/My3DScene.cpp +++ b/OpenGLEngine/My3DScene.cpp @@ -11,11 +11,13 @@ #include "MeshFactory.h" #include "Util.h" +#define FIRST_VERT -1.0f, 1.0f, 0.0f + My3DScene::My3DScene(Application& application) : Scene(application), m_shape(MeshFactory::gen( DrawMode::DRAW_TRIANGLES, - MyBatchTestShaderProgram::Vertex(-1.0f, 1.0f, 0.0f), + MyBatchTestShaderProgram::Vertex(FIRST_VERT), MyBatchTestShaderProgram::Vertex(1.0f, 1.0f, 0.0f), MyBatchTestShaderProgram::Vertex(-2.0f, -1.0f, 0.0f), MyBatchTestShaderProgram::Vertex(2.0f, -1.0f, 0.0f) @@ -61,28 +63,24 @@ void My3DScene::update(float delta_time, clock_t clock) { MyBatchTestShaderProgram::Color& color = m_batch.get_color(0); - color.r = 0.5f; - color.g = 0.5f; - color.b = 0.5f; + color.r = brightness; + color.g = brightness; + color.b = brightness; color.a = 1.0f; - MyBatchTestShaderProgram::Offset& offset = m_batch.get_offset(0); - offset.x = 1.0f;// 200 * (float)cos(radians); - offset.y = -1.0f; - offset.z = 0.0f; + Poseable& pose = m_batch.get_pose(0); + pose.update_position(vec3(3 * (float)cos(radians), 0.0f, -1.0f)); } { MyBatchTestShaderProgram::Color& color = m_batch.get_color(1); - color.r = 1.0f; - color.g = 1.0f; - color.b = 1.0f; + color.r = 1.0f - brightness; + color.g = 1.0f - brightness; + color.b = 1.0f - brightness; color.a = 1.0f; - MyBatchTestShaderProgram::Offset& offset = m_batch.get_offset(1); - offset.x = 0.0f; - offset.y = 0.0f;// 200 * (float)sin(radians); - offset.z = 0.0f; + Poseable& pose = m_batch.get_pose(1); + pose.update_position(vec3(0.0f, 3 * (float)sin(radians), 0.0f)); } vec3 camera_translation(0.0f, 0.0f, 0.0f); @@ -96,6 +94,20 @@ void My3DScene::update(float delta_time, clock_t clock) m_camera.translate(camera_translation * delta_time); + const mat4& world_to_view = m_camera.get_world_to_view_matrix(); + const mat4& orientation = m_batch.get_pose(0).get_orientation_matrix(); + const vec4 first_vert(FIRST_VERT, 1.0f); + + Util::set_console_position(0, 0); + std::cout << "World to View" << std::endl; + Util::print_matrix(m_camera.get_world_to_view_matrix()); + std::cout << "Pose 0 Orientation" << std::endl; + Util::print_matrix(m_batch.get_pose(0).get_orientation_matrix()); + std::cout << "First Vert" << std::endl; + Util::print_vec(first_vert); + std::cout << "Projected Position" << std::endl; + Util::print_vec(world_to_view * orientation * first_vert); + // TODO: Make a prerender function or move this to render m_batch.prerender(); } @@ -104,9 +116,8 @@ void My3DScene::render() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); m_shader_program.use(); - glUniformMatrix4fv(3, 1, GL_FALSE, &m_camera.get_world_to_view_matrix()[0][0]); + glUniformMatrix4fv(6, 1, GL_FALSE, &m_camera.get_world_to_view_matrix()[0][0]); m_batch.render(); } -#undef NEAR_PLANE -#undef FAR_PLANE \ No newline at end of file +#undef FIRST_VERT \ No newline at end of file diff --git a/OpenGLEngine/MyBatch.cpp b/OpenGLEngine/MyBatch.cpp index 795dfce..93edb4c 100644 --- a/OpenGLEngine/MyBatch.cpp +++ b/OpenGLEngine/MyBatch.cpp @@ -5,8 +5,8 @@ void MyBatch::setup_element_buffers() glBindBuffer(GL_ARRAY_BUFFER, m_element_buffers[COLOR_VBO_INDEX]); glBufferData(GL_ARRAY_BUFFER, m_color_elements.size() * sizeof(MyBatchTestShaderProgram::Color), NULL, GL_STREAM_DRAW); - glBindBuffer(GL_ARRAY_BUFFER, m_element_buffers[OFFSET_VBO_INDEX]); - glBufferData(GL_ARRAY_BUFFER, m_offset_elements.size() * sizeof(MyBatchTestShaderProgram::Offset), NULL, GL_STREAM_DRAW); + glBindBuffer(GL_ARRAY_BUFFER, m_element_buffers[POSEABLE_VBO_INDEX]); + glBufferData(GL_ARRAY_BUFFER, m_poseable_elements.size() * sizeof(Poseable), NULL, GL_STREAM_DRAW); } void MyBatch::setup_vao() @@ -17,9 +17,12 @@ void MyBatch::setup_vao() glBindBuffer(GL_ARRAY_BUFFER, m_element_buffers[COLOR_VBO_INDEX]); glEnableVertexAttribArray(1); glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 0, NULL); - glBindBuffer(GL_ARRAY_BUFFER, m_element_buffers[OFFSET_VBO_INDEX]); + glBindBuffer(GL_ARRAY_BUFFER, m_element_buffers[POSEABLE_VBO_INDEX]); glEnableVertexAttribArray(2); - glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 0, NULL); + glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, 0, NULL); + glVertexAttribPointer(3, 4, GL_FLOAT, GL_FALSE, 0, NULL); + glVertexAttribPointer(4, 4, GL_FLOAT, GL_FALSE, 0, NULL); + glVertexAttribPointer(5, 4, GL_FLOAT, GL_FALSE, 0, NULL); glVertexAttribDivisor(0, 0); // Only need to send the mesh data once (This should probably be done every time) glVertexAttribDivisor(1, 1); // Send the color data for each instance drawn @@ -33,8 +36,8 @@ void MyBatch::update_element_buffers() glBufferData(GL_ARRAY_BUFFER, m_color_elements.size() * sizeof(MyBatchTestShaderProgram::Color), NULL, GL_STREAM_DRAW); glBufferSubData(GL_ARRAY_BUFFER, 0, m_color_elements.size() * sizeof(MyBatchTestShaderProgram::Color), m_color_elements.data()); - glBindBuffer(GL_ARRAY_BUFFER, m_element_buffers[OFFSET_VBO_INDEX]); - glBufferData(GL_ARRAY_BUFFER, m_offset_elements.size() * sizeof(MyBatchTestShaderProgram::Offset), NULL, GL_STREAM_DRAW); - glBufferSubData(GL_ARRAY_BUFFER, 0, m_offset_elements.size() * sizeof(MyBatchTestShaderProgram::Offset), m_offset_elements.data()); + glBindBuffer(GL_ARRAY_BUFFER, m_element_buffers[POSEABLE_VBO_INDEX]); + glBufferData(GL_ARRAY_BUFFER, m_poseable_elements.size() * sizeof(Poseable), NULL, GL_STREAM_DRAW); + glBufferSubData(GL_ARRAY_BUFFER, 0, m_poseable_elements.size() * sizeof(Poseable), m_poseable_elements.data()); } diff --git a/OpenGLEngine/MyBatch.h b/OpenGLEngine/MyBatch.h index 1f17d4b..67a0111 100644 --- a/OpenGLEngine/MyBatch.h +++ b/OpenGLEngine/MyBatch.h @@ -2,6 +2,8 @@ #include "Batch.h" +#include "Poseable.h" + #include "MyBatchTestShaderProgram.h" class MyBatch : public Batch @@ -16,11 +18,11 @@ public: const MyBatchTestShaderProgram::Renderable* renderable, const SizeType& element_count, const SizeType& element_render_count - ) : Batch(renderable, element_render_count), m_color_elements(element_count), m_offset_elements(element_count) {} + ) : Batch(renderable, element_render_count), m_color_elements(element_count), m_poseable_elements(element_count) {} MyBatchTestShaderProgram::Color& get_color(const SizeType& index) { return m_color_elements[index]; } - MyBatchTestShaderProgram::Offset& get_offset(const SizeType& index) { return m_offset_elements[index]; } + Poseable& get_pose(const SizeType& index) { return m_poseable_elements[index]; } protected: void setup_element_buffers() override; @@ -31,8 +33,8 @@ protected: private: const int COLOR_VBO_INDEX = 0; - const int OFFSET_VBO_INDEX = 1; + const int POSEABLE_VBO_INDEX = 1; std::vector m_color_elements; - std::vector m_offset_elements; + std::vector m_poseable_elements; }; \ No newline at end of file diff --git a/OpenGLEngine/MyBatchTestVertexShader.glsl b/OpenGLEngine/MyBatchTestVertexShader.glsl index db013db..94e4ea1 100644 --- a/OpenGLEngine/MyBatchTestVertexShader.glsl +++ b/OpenGLEngine/MyBatchTestVertexShader.glsl @@ -1,14 +1,14 @@ #version 430 layout(location = 0) in vec3 vertex_position; layout(location = 1) in vec4 vertex_color; -layout(location = 2) in vec3 vertex_offset; +layout(location = 2) in mat4 m; // TODO: Try this with location 0 -layout(location = 3) uniform mat4 vp; +layout(location = 6) uniform mat4 pv; out vec4 fragment_color; void main() { fragment_color = vertex_color; - gl_Position = vp * vec4(vertex_position + vertex_offset, 1.0); + gl_Position = pv * vec4(vertex_position, 1.0); } \ No newline at end of file diff --git a/OpenGLEngine/MyObjectOrientedScene.cpp b/OpenGLEngine/MyObjectOrientedScene.cpp index 6054038..ce213de 100644 --- a/OpenGLEngine/MyObjectOrientedScene.cpp +++ b/OpenGLEngine/MyObjectOrientedScene.cpp @@ -10,17 +10,19 @@ #include "DrawMode.h" #include "MeshFactory.h" +#define FIRST_VERT -50.0f, 50.0f, 0.0f + MyObjectOrientedScene::MyObjectOrientedScene(Application& application) : Scene(application), m_shape(MeshFactory::gen( DrawMode::DRAW_TRIANGLES, - MyBatchTestShaderProgram::Vertex(-50.0f, 50.0f, 0.0f), + MyBatchTestShaderProgram::Vertex(FIRST_VERT), MyBatchTestShaderProgram::Vertex(50.0f, 150.0f, 0.0f), MyBatchTestShaderProgram::Vertex(-100.0f, -50.0f, 0.0f), MyBatchTestShaderProgram::Vertex(100.0f, -50.0f, 0.0f) ), DrawMode::DRAW_TRIANGLES), m_batch(&m_shape, 2), - m_camera(m_screen_size) + m_camera(vec3(m_screen_size, 4.0f))// TODO: change this back to just m_screen_size { } @@ -67,10 +69,8 @@ void MyObjectOrientedScene::update(float delta_time, clock_t clock) color.b = brightness; color.a = 1.0f; - MyBatchTestShaderProgram::Offset& offset = m_batch.get_offset(0); - offset.x = 200 * (float)cos(radians); - offset.y = 0.0f; - offset.z = 0.0f; + Poseable& pose = m_batch.get_pose(0); + pose.update_position(vec3(3 * (float)cos(radians), 0.0f, 0.0f)); } { @@ -80,10 +80,8 @@ void MyObjectOrientedScene::update(float delta_time, clock_t clock) color.b = 1.0f - brightness; color.a = 1.0f; - MyBatchTestShaderProgram::Offset& offset = m_batch.get_offset(1); - offset.x = 0.0f; - offset.y = 200 * (float)sin(radians); - offset.z = 0.0f; + Poseable& pose = m_batch.get_pose(1); + pose.update_position(vec3(0.0f, 3 * (float)sin(radians), 0.0f)); } vec2 camera_translation(0.0f, 0.0f); @@ -95,8 +93,19 @@ void MyObjectOrientedScene::update(float delta_time, clock_t clock) m_camera.translate(camera_translation * delta_time * 100.0f); + const mat4& world_to_view = m_camera.get_world_to_view_matrix(); + const mat4& orientation = m_batch.get_pose(0).get_orientation_matrix(); + vec4 first_vert(FIRST_VERT, 1.0f); + Util::set_console_position(0, 0); + std::cout << "World to View" << std::endl; Util::print_matrix(m_camera.get_world_to_view_matrix()); + std::cout << "Pose 0 Orientation" << std::endl; + Util::print_matrix(m_batch.get_pose(0).get_orientation_matrix()); + std::cout << "First Vert" << std::endl; + Util::print_vec(first_vert); + std::cout << "Projected Position" << std::endl; + Util::print_vec(world_to_view * orientation * first_vert); // TODO: Make a prerender function or move this to render m_batch.prerender(); @@ -106,6 +115,8 @@ void MyObjectOrientedScene::render() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); m_shader_program.use(); - glUniformMatrix4fv(3, 1, GL_FALSE, &m_camera.get_world_to_view_matrix()[0][0]); + glUniformMatrix4fv(6, 1, GL_FALSE, &m_camera.get_world_to_view_matrix()[0][0]); m_batch.render(); } + +#undef FIRST_VERT \ No newline at end of file diff --git a/OpenGLEngine/OpenGLEngine.vcxproj b/OpenGLEngine/OpenGLEngine.vcxproj index 1aa45c6..d952189 100644 --- a/OpenGLEngine/OpenGLEngine.vcxproj +++ b/OpenGLEngine/OpenGLEngine.vcxproj @@ -152,7 +152,6 @@ - diff --git a/OpenGLEngine/OpenGLEngine.vcxproj.filters b/OpenGLEngine/OpenGLEngine.vcxproj.filters index e9ad937..d51b4c8 100644 --- a/OpenGLEngine/OpenGLEngine.vcxproj.filters +++ b/OpenGLEngine/OpenGLEngine.vcxproj.filters @@ -57,9 +57,6 @@ Source Files\Example - - Source Files\Engine - Source Files\Engine diff --git a/OpenGLEngine/Poseable.h b/OpenGLEngine/Poseable.h index 0fd5b94..ac05ced 100644 --- a/OpenGLEngine/Poseable.h +++ b/OpenGLEngine/Poseable.h @@ -9,10 +9,10 @@ class Poseable public: // Assumes that forward, up, and right are orthogonal and normalized Poseable( - const vec3& position, - const vec3& forward = vec3(0.0f, 0.0f, 1.0f), - const vec3& up = vec3(0.0f, 1.0f, 0.0f), - const vec3& right = vec3(1.0f, 0.0f, 0.0f) + const vec3& position = vec3(0.0f, 0.0f, 0.0f), + const vec3& forward = vec3(0.0f, 0.0f, 1.0f), + const vec3& up = vec3(0.0f, 1.0f, 0.0f), + const vec3& right = vec3(1.0f, 0.0f, 0.0f) ); virtual void update_position(const vec3& position); diff --git a/OpenGLEngine/Util.cpp b/OpenGLEngine/Util.cpp index 39a4035..ed0cb1c 100644 --- a/OpenGLEngine/Util.cpp +++ b/OpenGLEngine/Util.cpp @@ -18,7 +18,7 @@ std::string Util::load_file(const std::string& path) } catch (std::ios::failure& e) { - throw Exception(std::string("Error Opening File: ") + e.what(), "class Util"); + throw EXCEPTION(std::string("Error Opening File: ") + e.what()); } if (input_stream.is_open()) { @@ -31,7 +31,7 @@ std::string Util::load_file(const std::string& path) } else { - throw Exception("Unable to access file: " + path, "class Util"); + throw EXCEPTION("Unable to access file: " + path); } } @@ -73,4 +73,11 @@ void Util::print_vec(const vec4& v) << "[" << v.y << "]" << std::endl << "[" << v.z << "]" << std::endl << "[" << v.w << "]" << std::endl; +} + +void Util::_check_gl_err(const char* file_name, int line) +{ + GLenum gl_err = glGetError(); + if (gl_err != GL_NO_ERROR) + throw Exception(("Caught OpenGL Error: " + std::string((const char*)gluErrorString(gl_err)) + " (" + std::to_string(gl_err) + ")").c_str(), file_name, line); } \ No newline at end of file diff --git a/OpenGLEngine/Util.h b/OpenGLEngine/Util.h index bd9a13c..87578d2 100644 --- a/OpenGLEngine/Util.h +++ b/OpenGLEngine/Util.h @@ -9,6 +9,8 @@ using namespace glm; #define DISPLAY_DIGITS 5 +#define CHECK_GL_ERR() Util::_check_gl_err(__FILE__, __LINE__) + class Util { public: @@ -18,4 +20,7 @@ public: static void print_vec(const vec2& v); static void print_vec(const vec3& v); static void print_vec(const vec4& v); + + // Use the CHECK_GL_ERR macro unless you know what you are doing with this function + static void _check_gl_err(const char* file_name, int line); }; \ No newline at end of file diff --git a/OpenGLEngine/main.cpp b/OpenGLEngine/main.cpp index 1d46bb8..65714b9 100644 --- a/OpenGLEngine/main.cpp +++ b/OpenGLEngine/main.cpp @@ -16,7 +16,9 @@ int main(int argc, char** argv) catch (Exception& e) { OutputDebugString("Caught Exception: ["); - OutputDebugString(e.get_class_name().c_str()); + OutputDebugString(e.get_file_name().c_str()); + OutputDebugString(":"); + OutputDebugString(std::to_string(e.get_line()).c_str()); OutputDebugString("]: "); OutputDebugString(e.get_message().c_str()); OutputDebugString("\n"); diff --git a/OpenGLEngine/stdafx.h b/OpenGLEngine/stdafx.h index baaadaa..e32e07c 100644 --- a/OpenGLEngine/stdafx.h +++ b/OpenGLEngine/stdafx.h @@ -6,4 +6,5 @@ #pragma comment(lib, "glew32.lib") #pragma comment(lib, "glfw3.lib") -#pragma comment(lib, "opengl32.lib") \ No newline at end of file +#pragma comment(lib, "opengl32.lib") +#pragma comment(lib, "glu32.lib") \ No newline at end of file