diff options
author | Kristian Høgsberg <[email protected]> | 2010-10-12 10:34:03 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-10-13 09:43:24 -0400 |
commit | e3c1c5377c7fcd17085bfb22fbc1cf30646751ba (patch) | |
tree | 597c8aad644594af16daa95dd5011ae2993e88df /src/mesa | |
parent | d838e4f66d585baf3577f1298dd97d1b7c444ac2 (diff) |
Get rid of GL/internal/glcore.h
__GLcontextModes is always only used as an implementation internal struct
at this point and we shouldn't install glcore.h anymore. Anything that
needs __GLcontextModes should just include the struct in its headers files
directly.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/drisw_util.h | 1 | ||||
-rw-r--r-- | src/mesa/main/context.c | 2 | ||||
-rw-r--r-- | src/mesa/main/context.h | 2 | ||||
-rw-r--r-- | src/mesa/main/glheader.h | 38 | ||||
-rw-r--r-- | src/mesa/main/imports.h | 10 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 87 |
7 files changed, 131 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 785beacd817..9fc797b6666 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -54,7 +54,6 @@ #include "xmlconfig.h" #include "main/glheader.h" #include "main/mtypes.h" -#include "GL/internal/glcore.h" #include "GL/internal/dri_interface.h" #define GLX_BAD_CONTEXT 5 diff --git a/src/mesa/drivers/dri/common/drisw_util.h b/src/mesa/drivers/dri/common/drisw_util.h index 9c3d01c99c0..2444f285737 100644 --- a/src/mesa/drivers/dri/common/drisw_util.h +++ b/src/mesa/drivers/dri/common/drisw_util.h @@ -39,7 +39,6 @@ #include "main/mtypes.h" #include <GL/gl.h> -#include <GL/internal/glcore.h> #include <GL/internal/dri_interface.h> typedef struct _drmLock drmLock; diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 284c8b1d37b..0a527040d98 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -163,7 +163,7 @@ GLfloat _mesa_ubyte_to_float_color_tab[256]; * We have to finish any pending rendering. */ void -_mesa_notifySwapBuffers(__GLcontext *ctx) +_mesa_notifySwapBuffers(GLcontext *ctx) { if (MESA_VERBOSE & VERBOSE_SWAPBUFFERS) _mesa_debug(ctx, "SwapBuffers\n"); diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index c61da62826f..b130bbb066f 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -157,7 +157,7 @@ extern void _mesa_init_get_hash(GLcontext *ctx); extern void -_mesa_notifySwapBuffers(__GLcontext *gc); +_mesa_notifySwapBuffers(GLcontext *gc); extern struct _glapi_table * diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index 45f7b55ad2a..1fe8c99f0f5 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -52,7 +52,6 @@ #define GL_GLEXT_PROTOTYPES #include "GL/gl.h" #include "GL/glext.h" -#include "GL/internal/glcore.h" /** @@ -140,6 +139,41 @@ typedef void *GLeglImageOES; */ #define MESA_GEOMETRY_PROGRAM 0x8c26 - +/* Several fields of __GLcontextModes can take these as values. Since + * GLX header files may not be available everywhere they need to be used, + * redefine them here. + */ +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 + +#define GLX_DONT_CARE 0xFFFFFFFF + +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 + +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 + +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 #endif /* GLHEADER_H */ diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 751f2065011..a56e0af9b5c 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -568,17 +568,19 @@ _mesa_str_checksum(const char *str); extern int _mesa_snprintf( char *str, size_t size, const char *fmt, ... ) PRINTFLIKE(3, 4); +struct __GLcontextRec; + extern void -_mesa_warning( __GLcontext *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3); +_mesa_warning( struct __GLcontextRec *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3); extern void -_mesa_problem( const __GLcontext *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3); +_mesa_problem( const struct __GLcontextRec *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3); extern void -_mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... ) PRINTFLIKE(3, 4); +_mesa_error( struct __GLcontextRec *ctx, GLenum error, const char *fmtString, ... ) PRINTFLIKE(3, 4); extern void -_mesa_debug( const __GLcontext *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3); +_mesa_debug( const struct __GLcontextRec *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3); #if defined(_MSC_VER) && !defined(snprintf) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 4851f0460cc..f428922814d 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -549,6 +549,93 @@ struct gl_shine_tab GLuint refcount; }; +/** + * Mode and limit information for a context. This information is + * kept around in the context so that values can be used during + * command execution, and for returning information about the + * context to the application. + * + * Instances of this structure are shared by the driver and the loader. To + * maintain binary compatability, new fields \b must be added only to the + * end of the structure. + * + * \sa _gl_context_modes_create + */ +typedef struct __GLcontextModesRec { + struct __GLcontextModesRec * next; + + GLboolean rgbMode; + GLboolean floatMode; + GLboolean colorIndexMode; + GLuint doubleBufferMode; + GLuint stereoMode; + + GLboolean haveAccumBuffer; + GLboolean haveDepthBuffer; + GLboolean haveStencilBuffer; + + GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ + GLuint redMask, greenMask, blueMask, alphaMask; + GLint rgbBits; /* total bits for rgb */ + GLint indexBits; /* total bits for colorindex */ + + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + + GLint numAuxBuffers; + + GLint level; + + GLint pixmapMode; + + /* GLX */ + GLint visualID; + GLint visualType; /**< One of the GLX X visual types. (i.e., + * \c GLX_TRUE_COLOR, etc.) + */ + + /* EXT_visual_rating / GLX 1.2 */ + GLint visualRating; + + /* EXT_visual_info / GLX 1.2 */ + GLint transparentPixel; + /* colors are floats scaled to ints */ + GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; + GLint transparentIndex; + + /* ARB_multisample / SGIS_multisample */ + GLint sampleBuffers; + GLint samples; + + /* SGIX_fbconfig / GLX 1.3 */ + GLint drawableType; + GLint renderType; + GLint xRenderable; + GLint fbconfigID; + + /* SGIX_pbuffer / GLX 1.3 */ + GLint maxPbufferWidth; + GLint maxPbufferHeight; + GLint maxPbufferPixels; + GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ + GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ + + /* SGIX_visual_select_group */ + GLint visualSelectGroup; + + /* OML_swap_method */ + GLint swapMethod; + + GLint screen; + + /* EXT_texture_from_pixmap */ + GLint bindToTextureRgb; + GLint bindToTextureRgba; + GLint bindToMipmapTexture; + GLint bindToTextureTargets; + GLint yInverted; +} __GLcontextModes; /** * Light source state. |