X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglx%2Fapple%2Fapple_xgl_api_viewport.c;h=c40061df490f304a4c232e9b24f7cd6d19cebfb2;hb=f5955c6bf869e323373c59c2687b463b7e16bdf4;hp=e39ab152235fdc8a631853991becad2fe91bb039;hpb=a1cb3babbef2af222b839a058694acc82a7074f1;p=mesa.git diff --git a/src/glx/apple/apple_xgl_api_viewport.c b/src/glx/apple/apple_xgl_api_viewport.c index e39ab152235..c40061df490 100644 --- a/src/glx/apple/apple_xgl_api_viewport.c +++ b/src/glx/apple/apple_xgl_api_viewport.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2009 Apple Inc. + Copyright (c) 2009-2011 Apple Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files @@ -30,17 +30,19 @@ #include "glxclient.h" #include "apple_glx_context.h" #include "apple_xgl_api.h" +#include "main/glheader.h" +#include "glapitable.h" -extern struct apple_xgl_api __gl_api; +extern struct _glapi_table * __ogl_framework_api; void -glViewport(GLint x, GLint y, GLsizei width, GLsizei height) +__applegl_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { - GLXContext gc = __glXGetCurrentContext(); + struct glx_context *gc = __glXGetCurrentContext(); Display *dpy = glXGetCurrentDisplay(); - if (gc && gc->driContext) + if (gc != &dummyContext && gc->driContext) apple_glx_context_update(dpy, gc->driContext); - __gl_api.Viewport(x, y, width, height); + __ogl_framework_api->Viewport(x, y, width, height); }