Reflect X visual changes to EGL code

This commit is contained in:
Cloudef 2012-04-26 02:26:01 +03:00 committed by Jari Vetoniemi
parent 819b09d479
commit 2815630688
2 changed files with 15 additions and 0 deletions

View File

@ -401,6 +401,12 @@ int _glfwCreateContext(_GLFWwindow* window,
void _glfwDestroyContext(_GLFWwindow* window) void _glfwDestroyContext(_GLFWwindow* window)
{ {
if (window->EGL.visual)
{
XFree(window->EGL.visual);
window->EGL.visual = NULL;
}
if (window->EGL.surface) if (window->EGL.surface)
{ {
// Release and destroy the surface // Release and destroy the surface
@ -416,6 +422,14 @@ void _glfwDestroyContext(_GLFWwindow* window)
} }
} }
//========================================================================
// Return the X visual associated with the specified context
//========================================================================
XVisualInfo* _glfwGetContextVisual(_GLFWwindow* window)
{
return window->EGL.visual;
}
//======================================================================== //========================================================================
// Make the OpenGL context associated with the specified window current // Make the OpenGL context associated with the specified window current

View File

@ -262,6 +262,7 @@ int _glfwCreateContext(_GLFWwindow* window,
const _GLFWwndconfig* wndconfig, const _GLFWwndconfig* wndconfig,
const _GLFWfbconfig* fbconfig); const _GLFWfbconfig* fbconfig);
void _glfwDestroyContext(_GLFWwindow* window); void _glfwDestroyContext(_GLFWwindow* window);
XVisualInfo* _glfwGetContextVisual(_GLFWwindow* window);
// Fullscreen support // Fullscreen support
int _glfwGetClosestVideoMode(int* width, int* height, int* rate); int _glfwGetClosestVideoMode(int* width, int* height, int* rate);