1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00
This commit is contained in:
Camilla Berglund 2016-03-28 20:11:22 +02:00
parent 925208d28f
commit f96d865b93
8 changed files with 9 additions and 15 deletions

View File

@ -155,18 +155,18 @@ static GLFWbool chooseFBConfigs(const _GLFWctxconfig* ctxconfig,
u->samples = getConfigAttrib(n, EGL_SAMPLES); u->samples = getConfigAttrib(n, EGL_SAMPLES);
u->doublebuffer = GLFW_TRUE; u->doublebuffer = GLFW_TRUE;
u->egl = n; u->handle = (uintptr_t) n;
usableCount++; usableCount++;
} }
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount); closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
if (closest) if (closest)
*result = closest->egl; *result = (EGLConfig) closest->handle;
free(nativeConfigs); free(nativeConfigs);
free(usableConfigs); free(usableConfigs);
return closest ? GLFW_TRUE : GLFW_FALSE; return closest != NULL;
} }

View File

@ -149,7 +149,6 @@ typedef GLFWglproc (EGLAPIENTRY * PFNEGLGETPROCADDRESSPROC)(const char*);
#define eglQueryString _glfw.egl.QueryString #define eglQueryString _glfw.egl.QueryString
#define eglGetProcAddress _glfw.egl.GetProcAddress #define eglGetProcAddress _glfw.egl.GetProcAddress
#define _GLFW_PLATFORM_FBCONFIG EGLConfig egl
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextEGL egl #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextEGL egl
#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryEGL egl #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryEGL egl

View File

@ -115,18 +115,18 @@ static GLFWbool chooseFBConfig(const _GLFWfbconfig* desired, GLXFBConfig* result
if (_glfw.glx.ARB_framebuffer_sRGB || _glfw.glx.EXT_framebuffer_sRGB) if (_glfw.glx.ARB_framebuffer_sRGB || _glfw.glx.EXT_framebuffer_sRGB)
u->sRGB = getFBConfigAttrib(n, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB); u->sRGB = getFBConfigAttrib(n, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB);
u->glx = n; u->handle = (uintptr_t) n;
usableCount++; usableCount++;
} }
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount); closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
if (closest) if (closest)
*result = closest->glx; *result = (GLXFBConfig) closest->handle;
XFree(nativeConfigs); XFree(nativeConfigs);
free(usableConfigs); free(usableConfigs);
return closest ? GLFW_TRUE : GLFW_FALSE; return closest != NULL;
} }
// Create the OpenGL context using legacy API // Create the OpenGL context using legacy API

View File

@ -108,7 +108,6 @@ typedef void (*PFNGLXDESTROYWINDOWPROC)(Display*,GLXWindow);
#define glXCreateWindow _glfw.glx.CreateWindow #define glXCreateWindow _glfw.glx.CreateWindow
#define glXDestroyWindow _glfw.glx.DestroyWindow #define glXDestroyWindow _glfw.glx.DestroyWindow
#define _GLFW_PLATFORM_FBCONFIG GLXFBConfig glx
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextGLX glx #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextGLX glx
#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryGLX glx #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryGLX glx

View File

@ -296,9 +296,7 @@ struct _GLFWfbconfig
int samples; int samples;
GLFWbool sRGB; GLFWbool sRGB;
GLFWbool doublebuffer; GLFWbool doublebuffer;
uintptr_t handle;
// This is defined in the context API's context.h
_GLFW_PLATFORM_FBCONFIG;
}; };

View File

@ -27,7 +27,6 @@
#ifndef _glfw3_nsgl_context_h_ #ifndef _glfw3_nsgl_context_h_
#define _glfw3_nsgl_context_h_ #define _glfw3_nsgl_context_h_
#define _GLFW_PLATFORM_FBCONFIG
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL nsgl #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL nsgl
#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryNSGL nsgl #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryNSGL nsgl

View File

@ -236,7 +236,7 @@ static GLFWbool choosePixelFormat(_GLFWwindow* window,
u->doublebuffer = GLFW_TRUE; u->doublebuffer = GLFW_TRUE;
} }
u->wgl = n; u->handle = n;
usableCount++; usableCount++;
} }
@ -259,7 +259,7 @@ static GLFWbool choosePixelFormat(_GLFWwindow* window,
return GLFW_FALSE; return GLFW_FALSE;
} }
*result = closest->wgl; *result = (int) closest->handle;
free(usableConfigs); free(usableConfigs);
return GLFW_TRUE; return GLFW_TRUE;

View File

@ -96,7 +96,6 @@ typedef BOOL (WINAPI * WGLSHARELISTS_T)(HGLRC,HGLRC);
#define _GLFW_RECREATION_REQUIRED 1 #define _GLFW_RECREATION_REQUIRED 1
#define _GLFW_RECREATION_IMPOSSIBLE 2 #define _GLFW_RECREATION_IMPOSSIBLE 2
#define _GLFW_PLATFORM_FBCONFIG int wgl
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextWGL wgl #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextWGL wgl
#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl