apple: Use glapi rather than reinventing the wheel
authorJeremy Huddleston <jeremyhu@apple.com>
Wed, 8 Jun 2011 01:51:17 +0000 (18:51 -0700)
committerJeremy Huddleston <jeremyhu@apple.com>
Wed, 8 Jun 2011 06:06:35 +0000 (23:06 -0700)
commit7d215e7c4d0ca8a18d91d4f30f79b97835a6d6c4
tree8d817992ed293025b7ad1b7f85f09acd98db9f6c
parent88cec591706ff63870c9c2a04394034b6f761f9c
apple: Use glapi rather than reinventing the wheel

With this change, Apple's libGL is now using glapi rather than implementing
its own dispatch.  In this implementation, two dispatch tables are created:

__ogl_framework_api always points into OpenGL.framework.
__applegl_api is the vtable that is used.  It points into OpenGL.framework
or to local implementations that override / interpose this in OpenGL.framework

The initialization for __ogl_framework_api was copied from XQuartz with some
modifications and probably still needs further edits to better deal with
aliases.

This is a good step towards supporting both indirect and direct rendering
on darwin.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
src/glx/apple/.gitignore
src/glx/apple/Makefile
src/glx/apple/apple_glapi.c [new file with mode: 0644]
src/glx/apple/apple_glx.c
src/glx/apple/apple_glx.h
src/glx/apple/apple_xgl_api.h [moved from src/glx/apple/apple_xgl_api_additional.c with 63% similarity]
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