mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Move all WGL weirdness to Win32 code
This commit is contained in:
parent
97d8ea8119
commit
23bf1b530b
@ -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
|
// Returns the Visual and depth of the chosen EGLConfig
|
||||||
//
|
//
|
||||||
#if defined(_GLFW_X11)
|
#if defined(_GLFW_X11)
|
||||||
|
@ -191,11 +191,6 @@ int _glfwCreateContext(_GLFWwindow* window,
|
|||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig);
|
const _GLFWfbconfig* fbconfig);
|
||||||
void _glfwDestroyContext(_GLFWwindow* window);
|
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)
|
#if defined(_GLFW_X11)
|
||||||
GLFWbool _glfwChooseVisual(const _GLFWctxconfig* ctxconfig,
|
GLFWbool _glfwChooseVisual(const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig,
|
const _GLFWfbconfig* fbconfig,
|
||||||
|
@ -92,6 +92,10 @@ typedef BOOL (WINAPI * WGLSHARELISTS_T)(HGLRC,HGLRC);
|
|||||||
#define _glfw_wglMakeCurrent _glfw.wgl.opengl32.MakeCurrent
|
#define _glfw_wglMakeCurrent _glfw.wgl.opengl32.MakeCurrent
|
||||||
#define _glfw_wglShareLists _glfw.wgl.opengl32.ShareLists
|
#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_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
|
||||||
|
@ -121,10 +121,6 @@ typedef HRESULT (WINAPI * DWMFLUSH_T)(VOID);
|
|||||||
#define _glfw_DwmIsCompositionEnabled _glfw.win32.dwmapi.DwmIsCompositionEnabled
|
#define _glfw_DwmIsCompositionEnabled _glfw.win32.dwmapi.DwmIsCompositionEnabled
|
||||||
#define _glfw_DwmFlush _glfw.win32.dwmapi.DwmFlush
|
#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 "win32_tls.h"
|
||||||
#include "winmm_joystick.h"
|
#include "winmm_joystick.h"
|
||||||
|
|
||||||
|
@ -830,6 +830,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
|
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
|
#if defined(_GLFW_WGL)
|
||||||
status = _glfwAnalyzeContext(window, ctxconfig, fbconfig);
|
status = _glfwAnalyzeContext(window, ctxconfig, fbconfig);
|
||||||
|
|
||||||
if (status == _GLFW_RECREATION_IMPOSSIBLE)
|
if (status == _GLFW_RECREATION_IMPOSSIBLE)
|
||||||
@ -868,6 +869,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
|
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user