diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index 5ab49c1..29ab288 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -116,12 +116,6 @@ typedef intptr_t EGLNativeDisplayType; typedef intptr_t EGLNativePixmapType; typedef intptr_t EGLNativeWindowType; -#elif defined(__unix__) && defined(EGL_NO_X11) - -typedef void *EGLNativeDisplayType; -typedef khronos_uintptr_t EGLNativePixmapType; -typedef khronos_uintptr_t EGLNativeWindowType; - #elif defined(__unix__) || defined(USE_X11) /* X11 (tentative) */ diff --git a/include/GL/gl.h b/include/GL/gl.h index 2518dfb..3f8cb62 100644 --- a/include/GL/gl.h +++ b/include/GL/gl.h @@ -27,24 +27,40 @@ #ifndef __gl_h_ #define __gl_h_ +#if defined(USE_MGL_NAMESPACE) +#include "gl_mangle.h" +#endif + + /********************************************************************** - * Begin system-specific stuff. + * Begin system-specific stuff. Do not do any of this when building + * for SciTech SNAP, as this is all done before this header file is + * included. */ +#if !defined(__SCITECH_SNAP__) + +#if defined(__BEOS__) +#include /* to get some BeOS-isms */ +#endif + +#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO)) +#define OPENSTEP +#endif #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) #define __WIN32__ #endif -#if defined(__WIN32__) && !defined(__CYGWIN__) +#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ # define GLAPI __declspec(dllexport) # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ # define GLAPI __declspec(dllimport) # else /* for use with static link lib build of Win32 edition only */ # define GLAPI extern -# endif +# endif /* _STATIC_MESA support */ # if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */ -# define GLAPIENTRY +# define GLAPIENTRY # else # define GLAPIENTRY __stdcall # endif @@ -56,6 +72,10 @@ # define GLAPIENTRY #endif /* WIN32 && !CYGWIN */ +#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) +# define PRAGMA_EXPORT_SUPPORTED 1 +#endif + /* * WINDOWS: Include windows.h here to define APIENTRY. * It is also useful when applications include this file by @@ -71,6 +91,10 @@ #include #endif +#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED +#pragma import on +#endif + #ifndef GLAPI #define GLAPI extern #endif @@ -92,6 +116,15 @@ #define GLAPIENTRYP GLAPIENTRY * #endif +#ifdef CENTERLINE_CLPP +#define signed +#endif + +#if defined(PRAGMA_EXPORT_SUPPORTED) +#pragma export on +#endif + +#endif /* !__SCITECH_SNAP__ */ /* * End system-specific stuff. **********************************************************************/ @@ -685,7 +718,7 @@ typedef double GLclampd; /* double precision float in [0,1] */ #define GL_LIST_BIT 0x00020000 #define GL_TEXTURE_BIT 0x00040000 #define GL_SCISSOR_BIT 0x00080000 -#define GL_ALL_ATTRIB_BITS 0xFFFFFFFF +#define GL_ALL_ATTRIB_BITS 0x000FFFFF /* OpenGL 1.1 */ @@ -1705,7 +1738,6 @@ GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, - /* * OpenGL 1.3 */ @@ -2053,6 +2085,26 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh +#if GL_ARB_shader_objects + +#ifndef GL_MESA_shader_debug +#define GL_MESA_shader_debug 1 + +#define GL_DEBUG_OBJECT_MESA 0x8759 +#define GL_DEBUG_PRINT_MESA 0x875A +#define GL_DEBUG_ASSERT_MESA 0x875B + +GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void); +GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); +GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength, + GLsizei *length, GLcharARB *debugLog); +GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); + +#endif /* GL_MESA_shader_debug */ + +#endif /* GL_ARB_shader_objects */ + + /* * ???. GL_MESA_packed_depth_stencil * XXX obsolete @@ -2069,6 +2121,60 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh #endif /* GL_MESA_packed_depth_stencil */ +#ifndef GL_MESA_program_debug +#define GL_MESA_program_debug 1 + +#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0 +#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1 +#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2 +#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3 +#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4 +#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5 +#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6 +#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7 + +typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data); + +GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data); + +GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v); + +#endif /* GL_MESA_program_debug */ + + +#ifndef GL_MESA_texture_array +#define GL_MESA_texture_array 1 + +/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array. + */ +#ifndef GL_EXT_texture_array + +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif /* GL_GLEXT_PROTOTYPES */ + +#if 0 +/* (temporarily) disabled because of collision with typedef in glext.h + * that happens if apps include both gl.h and glext.h + */ +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, + GLenum attachment, GLuint texture, GLint level, GLint layer); +#endif + +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#endif + +#endif + + #ifndef GL_ATI_blend_equation_separate #define GL_ATI_blend_equation_separate 1 @@ -2080,20 +2186,27 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen #endif /* GL_ATI_blend_equation_separate */ -/* GL_OES_EGL_image */ -#if !defined(GL_OES_EGL_image) && !defined(GL_EXT_EGL_image_storage) -typedef void* GLeglImageOES; -#endif +/** + ** NOTE!!!!! If you add new functions to this file, or update + ** glext.h be sure to regenerate the gl_mangle.h file. See comments + ** in that file for details. + **/ -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); + + +/********************************************************************** + * Begin system-specific stuff + */ +#if defined(PRAGMA_EXPORT_SUPPORTED) +#pragma export off #endif -typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); + +#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED +#pragma import off #endif +/* + * End system-specific stuff + **********************************************************************/ #ifdef __cplusplus diff --git a/src/GLX/libglxmapping.c b/src/GLX/libglxmapping.c index 44b6358..be384f8 100644 --- a/src/GLX/libglxmapping.c +++ b/src/GLX/libglxmapping.c @@ -591,10 +591,6 @@ __GLXvendorInfo *__glXLookupVendorByScreen(Display *dpy, const int screen) vendor = __glXLookupVendorByName(FALLBACK_VENDOR_NAME); } - if (!vendor) { - vendor = __glXLookupVendorByName("system"); - } - dpyInfo->vendors[screen] = vendor; } __glvndPthreadFuncs.rwlock_unlock(&dpyInfo->vendorLock); diff --git a/src/generate/eglFunctionList.py b/src/generate/eglFunctionList.py index bb13ab3..c14dd28 100644 --- a/src/generate/eglFunctionList.py +++ b/src/generate/eglFunctionList.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/python """ Contains a list of EGL functions to generate dispatch functions for. diff --git a/src/generate/genCommon.py b/src/generate/genCommon.py index ca2c64c..5c721ac 100644 --- a/src/generate/genCommon.py +++ b/src/generate/genCommon.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # (C) Copyright 2015, NVIDIA CORPORATION. # All Rights Reserved. diff --git a/src/generate/gen_egl_dispatch.py b/src/generate/gen_egl_dispatch.py index 3589e90..7c65e0b 100755 --- a/src/generate/gen_egl_dispatch.py +++ b/src/generate/gen_egl_dispatch.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/python """ Generates dispatch functions for EGL. diff --git a/src/generate/gen_gldispatch_mapi.py b/src/generate/gen_gldispatch_mapi.py index e97177e..03fb49a 100755 --- a/src/generate/gen_gldispatch_mapi.py +++ b/src/generate/gen_gldispatch_mapi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # Copyright (C) 2010 LunarG Inc. # (C) Copyright 2015, NVIDIA CORPORATION. diff --git a/src/generate/gen_libOpenGL_exports.py b/src/generate/gen_libOpenGL_exports.py index 1d3e991..92e4e7f 100755 --- a/src/generate/gen_libOpenGL_exports.py +++ b/src/generate/gen_libOpenGL_exports.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # (C) Copyright 2015, NVIDIA CORPORATION. # All Rights Reserved. diff --git a/src/generate/gen_libgl_glxstubs.py b/src/generate/gen_libgl_glxstubs.py index 718d59f..acbe731 100755 --- a/src/generate/gen_libgl_glxstubs.py +++ b/src/generate/gen_libgl_glxstubs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # (C) Copyright 2015, NVIDIA CORPORATION. # All Rights Reserved. diff --git a/src/generate/xml/egl.xml b/src/generate/xml/egl.xml index 6bc2ea2..c27f172 100644 --- a/src/generate/xml/egl.xml +++ b/src/generate/xml/egl.xml @@ -1002,9 +1002,6 @@ - - - - - + +