OSDN Git Service

apple: Rename __gl_api to __ogl_framework_api
authorJeremy Huddleston <jeremyhu@apple.com>
Wed, 8 Jun 2011 01:00:23 +0000 (21:00 -0400)
committerJeremy Huddleston <jeremyhu@apple.com>
Wed, 8 Jun 2011 06:06:35 +0000 (23:06 -0700)
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@apple.com>
src/glx/apple/apple_xgl_api_read.c
src/glx/apple/apple_xgl_api_stereo.c
src/glx/apple/apple_xgl_api_viewport.c
src/glx/apple/gen_api_library.tcl

index 45850b9..4a8873f 100644 (file)
@@ -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);
 }
index 5637dd4..a3c2156 100644 (file)
@@ -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);
    }
 }
 
index e29eba8..d4804fc 100644 (file)
@@ -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);
 }
index 159f9c0..eb633c2 100644 (file)
@@ -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"