Quellcode durchsuchen

Merge branch 'next' of https://github.com/blackberry/GamePlay into next

edA-qa mort-ora-y vor 13 Jahren
Ursprung
Commit
099ecbd80c
1 geänderte Dateien mit 14 neuen und 15 gelöschten Zeilen
  1. 14 15
      gameplay/src/PlatformLinux.cpp

+ 14 - 15
gameplay/src/PlatformLinux.cpp

@@ -380,20 +380,6 @@ Platform* Platform::create(Game* game, void* attachToWindow)
     FileSystem::setResourcePath("./");
     FileSystem::setResourcePath("./");
     Platform* platform = new Platform(game);
     Platform* platform = new Platform(game);
 
 
-    int configAttribs[] = 
-    { 
-        GLX_RENDER_TYPE,    GLX_RGBA_BIT,
-        GLX_DRAWABLE_TYPE,  GLX_WINDOW_BIT,
-        GLX_X_RENDERABLE,   True,
-        GLX_DEPTH_SIZE,     24, 
-        GLX_STENCIL_SIZE,   8,
-        GLX_RED_SIZE,       8,
-        GLX_BLUE_SIZE,      8,
-        GLX_GREEN_SIZE,     8,
-        GLX_DOUBLEBUFFER,   True,
-        0 
-    };
-
     // Get the display and initialize.
     // Get the display and initialize.
     __display = XOpenDisplay(NULL);
     __display = XOpenDisplay(NULL);
     if (__display == NULL)
     if (__display == NULL)
@@ -423,6 +409,19 @@ Platform* Platform::create(Game* game, void* attachToWindow)
     glXGetFBConfigAttrib = (int(*)(Display *dpy, GLXFBConfig config, int attribute, int *value))glXGetProcAddressARB((GLubyte*)"glXGetFBConfigAttrib");
     glXGetFBConfigAttrib = (int(*)(Display *dpy, GLXFBConfig config, int attribute, int *value))glXGetProcAddressARB((GLubyte*)"glXGetFBConfigAttrib");
 
 
     // Get the configs
     // Get the configs
+    int configAttribs[] = 
+    { 
+        GLX_RENDER_TYPE,    GLX_RGBA_BIT,
+        GLX_DRAWABLE_TYPE,  GLX_WINDOW_BIT,
+        GLX_X_RENDERABLE,   True,
+        GLX_DEPTH_SIZE,     24, 
+        GLX_STENCIL_SIZE,   8,
+        GLX_RED_SIZE,       8,
+        GLX_GREEN_SIZE,     8,
+        GLX_BLUE_SIZE,      8,
+        GLX_DOUBLEBUFFER,   True,
+        0 
+    };
     GLXFBConfig* configs;
     GLXFBConfig* configs;
     int configCount = 0;
     int configCount = 0;
     configs = glXChooseFBConfig(__display, DefaultScreen(__display), configAttribs, &configCount);
     configs = glXChooseFBConfig(__display, DefaultScreen(__display), configAttribs, &configCount);
@@ -465,7 +464,7 @@ Platform* Platform::create(Game* game, void* attachToWindow)
     }
     }
     glXMakeCurrent(__display, __window, __context);
     glXMakeCurrent(__display, __window, __context);
 
 
-    // Use OpenGL 2.x with GLEW  (TODO: Currently crashing here...)
+    // Use OpenGL 2.x with GLEW
     glewExperimental = GL_TRUE;
     glewExperimental = GL_TRUE;
     GLenum glewStatus = glewInit();
     GLenum glewStatus = glewInit();
     if(glewStatus != GLEW_OK)
     if(glewStatus != GLEW_OK)