glx: apple specific occurences of dummyContext check

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Cc: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Tapani Pälli
2016-06-07 13:33:34 +03:00
parent 2e3f067458
commit 5d9b50e596
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ __applegl_glDrawBuffer(GLenum mode)
{
struct glx_context * gc = __glXGetCurrentContext();
if (gc && apple_glx_context_uses_stereo(gc->driContext)) {
if (gc != &dummyContext && apple_glx_context_uses_stereo(gc->driContext)) {
GLenum buf[2];
GLsizei n = 0;
@@ -89,7 +89,7 @@ __applegl_glDrawBuffers(GLsizei n, const GLenum * bufs)
{
struct glx_context * gc = __glXGetCurrentContext();
if (gc && apple_glx_context_uses_stereo(gc->driContext)) {
if (gc != &dummyContext && apple_glx_context_uses_stereo(gc->driContext)) {
GLenum newbuf[n + 2];
GLsizei i, outi = 0;
bool have_back = false;
+1 -1
View File
@@ -41,7 +41,7 @@ __applegl_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
struct glx_context *gc = __glXGetCurrentContext();
Display *dpy = glXGetCurrentDisplay();
if (gc && gc->driContext)
if (gc != &dummyContext && gc->driContext)
apple_glx_context_update(dpy, gc->driContext);
__ogl_framework_api->Viewport(x, y, width, height);
+1 -1
View File
@@ -820,7 +820,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
{
#ifdef GLX_USE_APPLEGL
struct glx_context * gc = __glXGetCurrentContext();
if(gc && apple_glx_is_current_drawable(dpy, gc->driContext, drawable)) {
if(gc != &DummyContext && apple_glx_is_current_drawable(dpy, gc->driContext, drawable)) {
apple_glx_swap_buffers(gc->driContext);
} else {
__glXSendError(dpy, GLXBadCurrentWindow, 0, X_GLXSwapBuffers, false);