Merge branch 'master' of github.com:elmindreda/glfw

Conflicts:
	CMakeLists.txt
	src/egl_context.c
This commit is contained in:
Camilla Berglund 2013-01-05 18:37:12 +01:00
commit 279c32e3f9
2 changed files with 7 additions and 3 deletions

View File

@ -242,7 +242,7 @@ if (_GLFW_EGL)
set(CMAKE_REQUIRED_LIBRARIES ${EGL_LIBRARY}) set(CMAKE_REQUIRED_LIBRARIES ${EGL_LIBRARY})
if (_GLFW_X11) if (UNIX)
set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} egl") set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} egl")
endif() endif()

View File

@ -109,11 +109,13 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window,
{ {
_GLFWfbconfig* f = result + *found; _GLFWfbconfig* f = result + *found;
#if defined(_GLFW_X11)
if (!getConfigAttrib(configs[i], EGL_NATIVE_VISUAL_ID)) if (!getConfigAttrib(configs[i], EGL_NATIVE_VISUAL_ID))
{ {
// Only consider EGLConfigs with associated visuals // Only consider EGLConfigs with associated visuals
continue; continue;
} }
#endif // _GLFW_X11
if (!(getConfigAttrib(configs[i], EGL_COLOR_BUFFER_TYPE) & EGL_RGB_BUFFER)) if (!(getConfigAttrib(configs[i], EGL_COLOR_BUFFER_TYPE) & EGL_RGB_BUFFER))
{ {
@ -255,7 +257,7 @@ static int createContext(_GLFWwindow* window,
return GL_FALSE; return GL_FALSE;
} }
} }
#endif #endif // _GLFW_X11
if (wndconfig->clientAPI == GLFW_OPENGL_ES_API) if (wndconfig->clientAPI == GLFW_OPENGL_ES_API)
{ {
@ -439,11 +441,13 @@ int _glfwCreateContext(_GLFWwindow* window,
void _glfwDestroyContext(_GLFWwindow* window) void _glfwDestroyContext(_GLFWwindow* window)
{ {
#if defined(_GLFW_X11)
if (window->egl.visual) if (window->egl.visual)
{ {
XFree(window->egl.visual); XFree(window->egl.visual);
window->egl.visual = NULL; window->egl.visual = NULL;
} }
#endif // _GLFW_X11
if (window->egl.surface) if (window->egl.surface)
{ {
@ -467,7 +471,7 @@ int _glfwAnalyzeContext(const _GLFWwindow* window,
const _GLFWwndconfig* wndconfig, const _GLFWwndconfig* wndconfig,
const _GLFWfbconfig* fbconfig) const _GLFWfbconfig* fbconfig)
{ {
#if _GLFW_WIN32 #if defined(_GLFW_WIN32)
return _GLFW_RECREATION_NOT_NEEDED; return _GLFW_RECREATION_NOT_NEEDED;
#else #else
return 0; return 0;