Mesa (master): apple: Rename __gl_api to __ogl_framework_api

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Wed Jun 8 06:07:04 UTC 2011


Module: Mesa
Branch: master
Commit: 88cec591706ff63870c9c2a04394034b6f761f9c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=88cec591706ff63870c9c2a04394034b6f761f9c

Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Tue Jun  7 21:00:23 2011 -0400

apple: Rename __gl_api to __ogl_framework_api

In starting the migration to using mapi, rename __gl_api to
__ogl_framework_api since it is a vtable for OpenGL.framework

Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

---

 src/glx/apple/apple_xgl_api_read.c     |    8 ++++----
 src/glx/apple/apple_xgl_api_stereo.c   |   10 +++++-----
 src/glx/apple/apple_xgl_api_viewport.c |    4 ++--
 src/glx/apple/gen_api_library.tcl      |    6 +++---
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/glx/apple/apple_xgl_api_read.c b/src/glx/apple/apple_xgl_api_read.c
index 45850b9..4a8873f 100644
--- a/src/glx/apple/apple_xgl_api_read.c
+++ b/src/glx/apple/apple_xgl_api_read.c
@@ -38,7 +38,7 @@
 #include "apple_glx_context.h"
 #include "apple_xgl_api.h"
 
-extern struct apple_xgl_api __gl_api;
+extern struct apple_xgl_api __ogl_framework_api;
 
 struct apple_xgl_saved_state
 {
@@ -102,7 +102,7 @@ glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
 
    SetRead(&saved);
 
-   __gl_api.ReadPixels(x, y, width, height, format, type, pixels);
+   __ogl_framework_api.ReadPixels(x, y, width, height, format, type, pixels);
 
    UnsetRead(&saved);
 }
@@ -114,7 +114,7 @@ glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
 
    SetRead(&saved);
 
-   __gl_api.CopyPixels(x, y, width, height, type);
+   __ogl_framework_api.CopyPixels(x, y, width, height, type);
 
    UnsetRead(&saved);
 }
@@ -127,7 +127,7 @@ glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y,
 
    SetRead(&saved);
 
-   __gl_api.CopyColorTable(target, internalformat, x, y, width);
+   __ogl_framework_api.CopyColorTable(target, internalformat, x, y, width);
 
    UnsetRead(&saved);
 }
diff --git a/src/glx/apple/apple_xgl_api_stereo.c b/src/glx/apple/apple_xgl_api_stereo.c
index 5637dd4..a3c2156 100644
--- a/src/glx/apple/apple_xgl_api_stereo.c
+++ b/src/glx/apple/apple_xgl_api_stereo.c
@@ -41,7 +41,7 @@
 #include "apple_glx_context.h"
 #include "apple_xgl_api.h"
 
-extern struct apple_xgl_api __gl_api;
+extern struct apple_xgl_api __ogl_framework_api;
 /* 
  * These are special functions for stereoscopic support 
  * differences in MacOS X.
@@ -73,10 +73,10 @@ glDrawBuffer(GLenum mode)
          break;
       }
 
-      __gl_api.DrawBuffers(n, buf);
+      __ogl_framework_api.DrawBuffers(n, buf);
    }
    else {
-      __gl_api.DrawBuffer(mode);
+      __ogl_framework_api.DrawBuffer(mode);
    }
 }
 
@@ -114,10 +114,10 @@ glDrawBuffers(GLsizei n, const GLenum * bufs)
          newbuf[outi++] = GL_FRONT_RIGHT;
       }
 
-      __gl_api.DrawBuffers(outi, newbuf);
+      __ogl_framework_api.DrawBuffers(outi, newbuf);
    }
    else {
-      __gl_api.DrawBuffers(n, bufs);
+      __ogl_framework_api.DrawBuffers(n, bufs);
    }
 }
 
diff --git a/src/glx/apple/apple_xgl_api_viewport.c b/src/glx/apple/apple_xgl_api_viewport.c
index e29eba8..d4804fc 100644
--- a/src/glx/apple/apple_xgl_api_viewport.c
+++ b/src/glx/apple/apple_xgl_api_viewport.c
@@ -31,7 +31,7 @@
 #include "apple_glx_context.h"
 #include "apple_xgl_api.h"
 
-extern struct apple_xgl_api __gl_api;
+extern struct apple_xgl_api __ogl_framework_api;
 
 void
 glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
@@ -42,5 +42,5 @@ glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
    if (gc && gc->driContext)
       apple_glx_context_update(dpy, gc->driContext);
 
-   __gl_api.Viewport(x, y, width, height);
+   __ogl_framework_api.Viewport(x, y, width, height);
 }
diff --git a/src/glx/apple/gen_api_library.tcl b/src/glx/apple/gen_api_library.tcl
index 159f9c0..eb633c2 100644
--- a/src/glx/apple/gen_api_library.tcl
+++ b/src/glx/apple/gen_api_library.tcl
@@ -121,7 +121,7 @@ proc main {argc argv} {
 #include "apple_glx_context.h"
     }
 
-    puts $fd "struct apple_xgl_api __gl_api;"
+    puts $fd "struct apple_xgl_api __ogl_framework_api;"
     
     set sorted [lsort -dictionary [array names api]]
     
@@ -176,7 +176,7 @@ proc main {argc argv} {
 	    set alias [dict get $attr alias_for]
 	    set body "[set return] gl[set alias]([set callvars]);"
 	} else {
-	    set body "[set return]__gl_api.[set f]([set callvars]);"
+	    set body "[set return]__ogl_framework_api.[set f]([set callvars]);"
 	}
 
         puts $fd "GLAPI [dict get $attr return] APIENTRY gl[set f]([set pstr]) \{\n\t$body\n\}"
@@ -201,7 +201,7 @@ proc main {argc argv} {
 	    continue
 	}
 
-	puts $fd "\t__gl_api.$f = glsym(handle, \"gl$f\");"
+	puts $fd "\t__ogl_framework_api.$f = glsym(handle, \"gl$f\");"
     }
     
     puts $fd "\}\n"




More information about the mesa-commit mailing list