Browse Source

Fix glbinding to work with GLFW

Thomas Buck 9 years ago
parent
commit
04ef842389
2 changed files with 5 additions and 2 deletions
  1. 1
    1
      include/system/WindowGLFW.h
  2. 4
    1
      src/system/WindowGLFW.cpp

+ 1
- 1
include/system/WindowGLFW.h View File

@@ -10,7 +10,7 @@
10 10
 
11 11
 #include <glm/gtc/type_precision.hpp>
12 12
 
13
-#include <GLFW/glfw3.h>
13
+class GLFWwindow;
14 14
 
15 15
 class WindowGLFW {
16 16
   public:

+ 4
- 1
src/system/WindowGLFW.cpp View File

@@ -5,6 +5,9 @@
5 5
  * \author xythobuz
6 6
  */
7 7
 
8
+#define GLFW_INCLUDE_NONE
9
+#include <GLFW/glfw3.h>
10
+
8 11
 #include "global.h"
9 12
 #include "Log.h"
10 13
 #include "RunTime.h"
@@ -34,7 +37,7 @@ int WindowGLFW::initialize() {
34 37
     glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
35 38
     glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
36 39
     glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
37
-    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
40
+    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, int(GL_TRUE));
38 41
 
39 42
     window = glfwCreateWindow(size.x, size.y, VERSION,
40 43
                               fullscreen ? glfwGetPrimaryMonitor() : nullptr, nullptr);

Loading…
Cancel
Save