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

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

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

Loading…
Cancel
Save