forward declare GLX typedefs to limit conflicts from glx.h

This commit is contained in:
Mike Morris
2015-02-10 10:53:44 -08:00
parent 80f1795b37
commit e8a2c39365
4 changed files with 14 additions and 7 deletions

View File

@@ -28,6 +28,8 @@ CGLProc CGLGetProcAddress(const char *proc) {
CFRelease(name);
return symbol;
}
#elif MBGL_USE_GLX
#include <GL/glx.h>
#endif
namespace mbgl {
@@ -104,7 +106,7 @@ void HeadlessView::createContext() {
if (!glContext) {
// Try to create a legacy context
glContext = glXCreateNewContext(xDisplay, fbConfigs[0], GLX_RGBA_TYPE, 0, True);
glContext = glXCreateNewContext(xDisplay, fbConfigs[0], GLX_RGBA_TYPE, None, True);
if (glContext) {
if (!glXIsDirect(xDisplay, glContext)) {
mbgl::Log::Error(mbgl::Event::OpenGL, "Failed to create direct OpenGL Legacy context");
@@ -123,7 +125,7 @@ void HeadlessView::createContext() {
int pbufferAttributes[] = {
GLX_PBUFFER_WIDTH, 8,
GLX_PBUFFER_HEIGHT, 8,
0
None
};
glxPbuffer = glXCreatePbuffer(xDisplay, fbConfigs[0], pbufferAttributes);
#endif