diff options
author | Jeremy Huddleston <[email protected]> | 2011-06-07 18:51:17 -0700 |
---|---|---|
committer | Jeremy Huddleston <[email protected]> | 2011-06-07 23:06:35 -0700 |
commit | 7d215e7c4d0ca8a18d91d4f30f79b97835a6d6c4 (patch) | |
tree | 8d817992ed293025b7ad1b7f85f09acd98db9f6c /src/glx/apple/apple_xgl_api.h | |
parent | 88cec591706ff63870c9c2a04394034b6f761f9c (diff) |
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 <[email protected]>
Diffstat (limited to 'src/glx/apple/apple_xgl_api.h')
-rw-r--r-- | src/glx/apple/apple_xgl_api.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/glx/apple/apple_xgl_api.h b/src/glx/apple/apple_xgl_api.h new file mode 100644 index 00000000000..c6d8903a0b3 --- /dev/null +++ b/src/glx/apple/apple_xgl_api.h @@ -0,0 +1,52 @@ +/* + Copyright (c) 2011 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#ifndef APPLE_XGL_API_H + +__private_extern__ void +__applegl_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, void *pixels); + +__private_extern__ void +__applegl_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); + +__private_extern__ void +__applegl_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, + GLsizei width); + +__private_extern__ void +__applegl_glDrawBuffer(GLenum mode); + +__private_extern__ void +__applegl_glDrawBuffersARB(GLsizei n, const GLenum * bufs); + +__private_extern__ void +__applegl_glViewport(GLint x, GLint y, GLsizei width, GLsizei height); + +#endif |