mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
Buildfixes to work around issues in OpenGL.framework
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
f64773010d
commit
a1cb3babbe
11 changed files with 60 additions and 135 deletions
|
|
@ -31,10 +31,10 @@
|
|||
#define APPLE_GLX_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <OpenGL/CGLTypes.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glxint.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#define XP_NO_X_HEADERS
|
||||
#include <Xplugin.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -29,11 +29,19 @@
|
|||
#ifndef APPLE_GLX_CONTEXT_H
|
||||
#define APPLE_GLX_CONTEXT_H
|
||||
|
||||
/* <rdar://problem/6953344> */
|
||||
#define glTexImage1D glTexImage1D_OSX
|
||||
#define glTexImage2D glTexImage2D_OSX
|
||||
#define glTexImage3D glTexImage3D_OSX
|
||||
#include <OpenGL/CGLTypes.h>
|
||||
#include <OpenGL/CGLContext.h>
|
||||
#undef glTexImage1D
|
||||
#undef glTexImage2D
|
||||
#undef glTexImage3D
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <GL/glx.h>
|
||||
#include <OpenGL/CGLTypes.h>
|
||||
#include <OpenGL/CGLContext.h>
|
||||
#define XP_NO_X_HEADERS
|
||||
#include <Xplugin.h>
|
||||
#undef XP_NO_X_HEADERS
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@
|
|||
#ifndef APPLE_GLX_DRAWABLE_H
|
||||
#define APPLE_GLX_DRAWABLE_H
|
||||
|
||||
/* Must be first for:
|
||||
* <rdar://problem/6953344>
|
||||
*/
|
||||
#include "apple_glx_context.h"
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
|
|
@ -36,7 +41,6 @@
|
|||
#define XP_NO_X_HEADERS
|
||||
#include <Xplugin.h>
|
||||
#undef XP_NO_X_HEADERS
|
||||
#include "apple_glx_context.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,16 +27,33 @@
|
|||
prior written authorization.
|
||||
*/
|
||||
|
||||
/* Must be before OpenGL.framework is included. Remove once fixed:
|
||||
* <rdar://problem/7872773>
|
||||
*/
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#define __gltypes_h_ 1
|
||||
|
||||
/* Must be first for:
|
||||
* <rdar://problem/6953344>
|
||||
*/
|
||||
#include "apple_glx_context.h"
|
||||
#include "apple_glx_drawable.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#include <GL/glew.h>
|
||||
#include "apple_glx.h"
|
||||
#include "glcontextmodes.h"
|
||||
#include "apple_glx_context.h"
|
||||
#include "apple_glx_drawable.h"
|
||||
#include "apple_cgl.h"
|
||||
|
||||
/* mesa defines in glew.h, Apple in glext.h.
|
||||
* Due to namespace nightmares, just do it here.
|
||||
*/
|
||||
#ifndef GL_TEXTURE_RECTANGLE_EXT
|
||||
#define GL_TEXTURE_RECTANGLE_EXT 0x84F5
|
||||
#endif
|
||||
|
||||
static bool pbuffer_make_current(struct apple_glx_context *ac,
|
||||
struct apple_glx_drawable *d);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,18 @@
|
|||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
/* <rdar://problem/6953344> */
|
||||
#define glTexImage1D glTexImage1D_OSX
|
||||
#define glTexImage2D glTexImage2D_OSX
|
||||
#define glTexImage3D glTexImage3D_OSX
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#include <OpenGL/CGLContext.h>
|
||||
#include <OpenGL/CGLRenderers.h>
|
||||
#undef glTexImage1D
|
||||
#undef glTexImage2D
|
||||
#undef glTexImage3D
|
||||
|
||||
#include "apple_cgl.h"
|
||||
#include "apple_visual.h"
|
||||
#include "apple_glx.h"
|
||||
|
|
|
|||
|
|
@ -34,10 +34,9 @@
|
|||
* drawable if they are different.
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include "apple_xgl_api_read.h"
|
||||
#include "apple_xgl_api.h"
|
||||
#include "apple_cgl.h"
|
||||
#include "glxclient.h"
|
||||
#include "apple_glx_context.h"
|
||||
#include "apple_xgl_api.h"
|
||||
|
||||
extern struct apple_xgl_api __gl_api;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2008, 2009 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file works with the glXMakeContextCurrent readable drawable.
|
||||
*/
|
||||
#ifndef APPLE_XGL_API_READ_H
|
||||
#define APPLE_XGL_API_READ_H
|
||||
|
||||
#include "glxclient.h"
|
||||
|
||||
extern void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, void *pixels);
|
||||
|
||||
extern void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLenum type);
|
||||
|
||||
extern void glCopyColorTable(GLenum target, GLenum internalformat, GLint x,
|
||||
GLint y, GLsizei width);
|
||||
|
||||
#endif
|
||||
|
|
@ -27,10 +27,19 @@
|
|||
prior written authorization.
|
||||
*/
|
||||
|
||||
/* This should be removed once stereo hardware bugs are fixed
|
||||
* <rdar://problem/6729006>
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "apple_xgl_api_stereo.h"
|
||||
#include "apple_xgl_api.h"
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
#include "glxclient.h"
|
||||
#include "apple_glx_context.h"
|
||||
#include "apple_xgl_api.h"
|
||||
|
||||
extern struct apple_xgl_api __gl_api;
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2009 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.
|
||||
*/
|
||||
|
||||
#include "glxclient.h"
|
||||
|
||||
#ifndef APPLE_XGL_API_STEREO_H
|
||||
#define APPLE_XGL_API_STEREO_H
|
||||
|
||||
extern void glDrawBuffer(GLenum mode);
|
||||
extern void glDrawBuffers(GLsizei n, const GLenum * bufs);
|
||||
extern void glDrawBuffersARB(GLsizei n, const GLenum * bufs);
|
||||
|
||||
#endif
|
||||
|
|
@ -26,9 +26,10 @@
|
|||
promote the sale, use or other dealings in this Software without
|
||||
prior written authorization.
|
||||
*/
|
||||
|
||||
#include "glxclient.h"
|
||||
#include "apple_glx_context.h"
|
||||
#include "apple_xgl_api.h"
|
||||
#include "apple_xgl_api_viewport.h"
|
||||
|
||||
extern struct apple_xgl_api __gl_api;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2009 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_VIEWPORT_H
|
||||
#define APPLE_XGL_API_VIEWPORT_H
|
||||
|
||||
#include "glxclient.h"
|
||||
|
||||
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue