mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 22:34:35 +00:00
Began decoupling EGL code from X11.
This commit is contained in:
parent
26a843043c
commit
251964f84f
@ -334,7 +334,7 @@ int _glfwInitOpenGL(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_glfwLibrary.EGL.display = eglGetDisplay((EGLNativeDisplayType) _glfwLibrary.X11.display);
|
_glfwLibrary.EGL.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY);
|
||||||
if (_glfwLibrary.EGL.display == EGL_NO_DISPLAY)
|
if (_glfwLibrary.EGL.display == EGL_NO_DISPLAY)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
||||||
@ -463,7 +463,7 @@ void _glfwPlatformMakeContextCurrent(_GLFWwindow* window)
|
|||||||
{
|
{
|
||||||
window->EGL.surface = eglCreateWindowSurface(_glfwLibrary.EGL.display,
|
window->EGL.surface = eglCreateWindowSurface(_glfwLibrary.EGL.display,
|
||||||
window->EGL.config,
|
window->EGL.config,
|
||||||
(EGLNativeWindowType) window->X11.handle,
|
_GLFW_EGL_NATIVE_WINDOW,
|
||||||
NULL);
|
NULL);
|
||||||
if (window->EGL.surface == EGL_NO_SURFACE)
|
if (window->EGL.surface == EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextEGL EGL
|
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextEGL EGL
|
||||||
#define _GLFW_PLATFORM_LIBRARY_OPENGL_STATE _GLFWlibraryEGL EGL
|
#define _GLFW_PLATFORM_LIBRARY_OPENGL_STATE _GLFWlibraryEGL EGL
|
||||||
|
|
||||||
|
#define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->X11.handle)
|
||||||
|
#define _GLFW_EGL_NATIVE_DISPLAY ((EGLNativeDisplayType) _glfwLibrary.X11.display)
|
||||||
|
|
||||||
|
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW platform specific types
|
// GLFW platform specific types
|
||||||
|
Loading…
Reference in New Issue
Block a user