summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-10-12 11:58:47 -0400
committerKristian Høgsberg <[email protected]>2010-10-13 09:43:24 -0400
commitd3491e775fb07f891463b2185d74bbad62f3ed24 (patch)
tree8c160fe7b819708dd8eeaea13a602cf8cba3994a /src/mesa/main
parent705e142dda047f24b563fc2bea0f922173e91d1b (diff)
Rename GLvisual and __GLcontextModes to struct gl_config
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c30
-rw-r--r--src/mesa/main/context.h18
-rw-r--r--src/mesa/main/framebuffer.c4
-rw-r--r--src/mesa/main/framebuffer.h4
-rw-r--r--src/mesa/main/glheader.h2
-rw-r--r--src/mesa/main/mtypes.h21
6 files changed, 33 insertions, 46 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index a3479f1f7dc..f8ffdc25dbb 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -180,7 +180,7 @@ _mesa_notifySwapBuffers(GLcontext *ctx)
/*@{*/
/**
- * Allocates a GLvisual structure and initializes it via
+ * Allocates a struct gl_config structure and initializes it via
* _mesa_initialize_visual().
*
* \param dbFlag double buffering
@@ -198,12 +198,12 @@ _mesa_notifySwapBuffers(GLcontext *ctx)
* \param alphaBits same as above.
* \param numSamples not really used.
*
- * \return pointer to new GLvisual or NULL if requested parameters can't be
+ * \return pointer to new struct gl_config or NULL if requested parameters can't be
* met.
*
* \note Need to add params for level and numAuxBuffers (at least)
*/
-GLvisual *
+struct gl_config *
_mesa_create_visual( GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -218,7 +218,7 @@ _mesa_create_visual( GLboolean dbFlag,
GLint accumAlphaBits,
GLint numSamples )
{
- GLvisual *vis = (GLvisual *) calloc(1, sizeof(GLvisual));
+ struct gl_config *vis = (struct gl_config *) calloc(1, sizeof(struct gl_config));
if (vis) {
if (!_mesa_initialize_visual(vis, dbFlag, stereoFlag,
redBits, greenBits, blueBits, alphaBits,
@@ -235,15 +235,15 @@ _mesa_create_visual( GLboolean dbFlag,
/**
* Makes some sanity checks and fills in the fields of the
- * GLvisual object with the given parameters. If the caller needs
- * to set additional fields, he should just probably init the whole GLvisual
+ * struct gl_config object with the given parameters. If the caller needs
+ * to set additional fields, he should just probably init the whole struct gl_config
* object himself.
* \return GL_TRUE on success, or GL_FALSE on failure.
*
* \sa _mesa_create_visual() above for the parameter description.
*/
GLboolean
-_mesa_initialize_visual( GLvisual *vis,
+_mesa_initialize_visual( struct gl_config *vis,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -311,7 +311,7 @@ _mesa_initialize_visual( GLvisual *vis,
* Frees the visual structure.
*/
void
-_mesa_destroy_visual( GLvisual *vis )
+_mesa_destroy_visual( struct gl_config *vis )
{
free(vis);
}
@@ -856,7 +856,7 @@ _mesa_alloc_dispatch_table(int size)
GLboolean
_mesa_initialize_context_for_api(GLcontext *ctx,
gl_api api,
- const GLvisual *visual,
+ const struct gl_config *visual,
GLcontext *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
@@ -994,7 +994,7 @@ _mesa_initialize_context_for_api(GLcontext *ctx,
GLboolean
_mesa_initialize_context(GLcontext *ctx,
- const GLvisual *visual,
+ const struct gl_config *visual,
GLcontext *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
@@ -1014,7 +1014,7 @@ _mesa_initialize_context(GLcontext *ctx,
* the rendering context.
*
* \param api the GL API type to create the context for
- * \param visual a GLvisual pointer (we copy the struct contents)
+ * \param visual a struct gl_config pointer (we copy the struct contents)
* \param share_list another context to share display lists with or NULL
* \param driverFunctions points to the dd_function_table into which the
* driver has plugged in all its special functions.
@@ -1024,7 +1024,7 @@ _mesa_initialize_context(GLcontext *ctx,
*/
GLcontext *
_mesa_create_context_for_api(gl_api api,
- const GLvisual *visual,
+ const struct gl_config *visual,
GLcontext *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
@@ -1049,7 +1049,7 @@ _mesa_create_context_for_api(gl_api api,
}
GLcontext *
-_mesa_create_context(const GLvisual *visual,
+_mesa_create_context(const struct gl_config *visual,
GLcontext *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
@@ -1293,8 +1293,8 @@ _mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
static GLboolean
check_compatible(const GLcontext *ctx, const GLframebuffer *buffer)
{
- const GLvisual *ctxvis = &ctx->Visual;
- const GLvisual *bufvis = &buffer->Visual;
+ const struct gl_config *ctxvis = &ctx->Visual;
+ const struct gl_config *bufvis = &buffer->Visual;
if (ctxvis == bufvis)
return GL_TRUE;
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index b130bbb066f..969c07e53c0 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -30,7 +30,7 @@
* There are three large Mesa data types/classes which are meant to be
* used by device drivers:
* - GLcontext: this contains the Mesa rendering state
- * - GLvisual: this describes the color buffer (RGB vs. ci), whether or not
+ * - struct gl_config: this describes the color buffer (RGB vs. ci), whether or not
* there's a depth buffer, stencil buffer, etc.
* - GLframebuffer: contains pointers to the depth buffer, stencil buffer,
* accum buffer and alpha buffers.
@@ -38,7 +38,7 @@
* These types should be encapsulated by corresponding device driver
* data types. See xmesa.h and xmesaP.h for an example.
*
- * In OOP terms, GLcontext, GLvisual, and GLframebuffer are base classes
+ * In OOP terms, GLcontext, struct gl_config, and GLframebuffer are base classes
* which the device driver must derive from.
*
* The following functions create and destroy these data types.
@@ -59,7 +59,7 @@ struct _glapi_table;
/** \name Visual-related functions */
/*@{*/
-extern GLvisual *
+extern struct gl_config *
_mesa_create_visual( GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -75,7 +75,7 @@ _mesa_create_visual( GLboolean dbFlag,
GLint numSamples );
extern GLboolean
-_mesa_initialize_visual( GLvisual *v,
+_mesa_initialize_visual( struct gl_config *v,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -91,7 +91,7 @@ _mesa_initialize_visual( GLvisual *v,
GLint numSamples );
extern void
-_mesa_destroy_visual( GLvisual *vis );
+_mesa_destroy_visual( struct gl_config *vis );
/*@}*/
@@ -100,21 +100,21 @@ _mesa_destroy_visual( GLvisual *vis );
/*@{*/
extern GLcontext *
-_mesa_create_context( const GLvisual *visual,
+_mesa_create_context( const struct gl_config *visual,
GLcontext *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext );
extern GLboolean
_mesa_initialize_context( GLcontext *ctx,
- const GLvisual *visual,
+ const struct gl_config *visual,
GLcontext *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext );
extern GLcontext *
_mesa_create_context_for_api(gl_api api,
- const GLvisual *visual,
+ const struct gl_config *visual,
GLcontext *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext);
@@ -122,7 +122,7 @@ _mesa_create_context_for_api(gl_api api,
extern GLboolean
_mesa_initialize_context_for_api(GLcontext *ctx,
gl_api api,
- const GLvisual *visual,
+ const struct gl_config *visual,
GLcontext *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext);
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index a98c09cfbf3..64da8ba84f9 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -83,7 +83,7 @@ compute_depth_max(struct gl_framebuffer *fb)
* \sa _mesa_new_framebuffer
*/
struct gl_framebuffer *
-_mesa_create_framebuffer(const GLvisual *visual)
+_mesa_create_framebuffer(const struct gl_config *visual)
{
struct gl_framebuffer *fb = CALLOC_STRUCT(gl_framebuffer);
assert(visual);
@@ -122,7 +122,7 @@ _mesa_new_framebuffer(GLcontext *ctx, GLuint name)
*/
void
_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb,
- const GLvisual *visual)
+ const struct gl_config *visual)
{
assert(fb);
assert(visual);
diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h
index 2e9844282f8..0cf28424cf9 100644
--- a/src/mesa/main/framebuffer.h
+++ b/src/mesa/main/framebuffer.h
@@ -29,14 +29,14 @@
#include "mtypes.h"
extern struct gl_framebuffer *
-_mesa_create_framebuffer(const GLvisual *visual);
+_mesa_create_framebuffer(const struct gl_config *visual);
extern struct gl_framebuffer *
_mesa_new_framebuffer(GLcontext *ctx, GLuint name);
extern void
_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb,
- const GLvisual *visual);
+ const struct gl_config *visual);
extern void
_mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name);
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 0c9013de66e..08ad5f32018 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -139,7 +139,7 @@ typedef void *GLeglImageOES;
*/
#define MESA_GEOMETRY_PROGRAM 0x8c26
-/* Several fields of __GLcontextModes can take these as values. Since
+/* Several fields of struct gl_config can take these as values. Since
* GLX header files may not be available everywhere they need to be used,
* redefine them here.
*/
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 8eae64b62aa..901607adcc1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -125,7 +125,6 @@ struct gl_texture_image;
struct gl_texture_object;
struct st_context;
typedef struct __GLcontextRec GLcontext;
-typedef struct __GLcontextModesRec GLvisual;
typedef struct gl_framebuffer GLframebuffer;
/*@}*/
@@ -549,19 +548,7 @@ 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 gl_config {
GLboolean rgbMode;
GLboolean floatMode;
GLboolean colorIndexMode;
@@ -614,7 +601,7 @@ typedef struct __GLcontextModesRec {
GLint bindToMipmapTexture;
GLint bindToTextureTargets;
GLint yInverted;
-} __GLcontextModes;
+};
/**
* Light source state.
@@ -2453,7 +2440,7 @@ struct gl_framebuffer
* The framebuffer's visual. Immutable if this is a window system buffer.
* Computed from attachments if user-made FBO.
*/
- GLvisual Visual;
+ struct gl_config Visual;
GLboolean Initialized;
@@ -3074,7 +3061,7 @@ struct __GLcontextRec
struct _glapi_table *CurrentDispatch; /**< == Save or Exec !! */
/*@}*/
- GLvisual Visual;
+ struct gl_config Visual;
GLframebuffer *DrawBuffer; /**< buffer for writing */
GLframebuffer *ReadBuffer; /**< buffer for reading */
GLframebuffer *WinSysDrawBuffer; /**< set with MakeCurrent */