Move all WGL weirdness to Win32 code

This commit is contained in:
Camilla Berglund 2015-10-28 02:06:51 +01:00
parent 97d8ea8119
commit 23bf1b530b
5 changed files with 6 additions and 20 deletions

View File

@ -526,17 +526,6 @@ void _glfwDestroyContext(_GLFWwindow* window)
}
}
// Analyzes the specified context for possible recreation
//
#if defined(_GLFW_WIN32)
int _glfwAnalyzeContext(const _GLFWwindow* window,
const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig)
{
return _GLFW_RECREATION_NOT_NEEDED;
}
#endif // _GLFW_WIN32
// Returns the Visual and depth of the chosen EGLConfig
//
#if defined(_GLFW_X11)

View File

@ -191,11 +191,6 @@ int _glfwCreateContext(_GLFWwindow* window,
const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig);
void _glfwDestroyContext(_GLFWwindow* window);
#if defined(_GLFW_WIN32)
int _glfwAnalyzeContext(const _GLFWwindow* window,
const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig);
#endif /*_GLFW_WIN32*/
#if defined(_GLFW_X11)
GLFWbool _glfwChooseVisual(const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig,

View File

@ -92,6 +92,10 @@ typedef BOOL (WINAPI * WGLSHARELISTS_T)(HGLRC,HGLRC);
#define _glfw_wglMakeCurrent _glfw.wgl.opengl32.MakeCurrent
#define _glfw_wglShareLists _glfw.wgl.opengl32.ShareLists
#define _GLFW_RECREATION_NOT_NEEDED 0
#define _GLFW_RECREATION_REQUIRED 1
#define _GLFW_RECREATION_IMPOSSIBLE 2
#define _GLFW_PLATFORM_FBCONFIG int wgl
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextWGL wgl
#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl

View File

@ -121,10 +121,6 @@ typedef HRESULT (WINAPI * DWMFLUSH_T)(VOID);
#define _glfw_DwmIsCompositionEnabled _glfw.win32.dwmapi.DwmIsCompositionEnabled
#define _glfw_DwmFlush _glfw.win32.dwmapi.DwmFlush
#define _GLFW_RECREATION_NOT_NEEDED 0
#define _GLFW_RECREATION_REQUIRED 1
#define _GLFW_RECREATION_IMPOSSIBLE 2
#include "win32_tls.h"
#include "winmm_joystick.h"

View File

@ -830,6 +830,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
return GLFW_FALSE;
#if defined(_GLFW_WGL)
status = _glfwAnalyzeContext(window, ctxconfig, fbconfig);
if (status == _GLFW_RECREATION_IMPOSSIBLE)
@ -868,6 +869,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
return GLFW_FALSE;
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
return GLFW_FALSE;
#endif
}
}