glx: unify GLX_SGIX_pbuffer aliased declarations
[mesa.git] / src / glx / apple / apple_xgl_api_viewport.c
index e29eba8253439bf527fd68e7184b4aaa5142635a..c40061df490f304a4c232e9b24f7cd6d19cebfb2 100644 (file)
@@ -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
 #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)
 {
    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);
 }