}
GLboolean
-dri_create_context(gl_api api, const __GLcontextModes * visual,
+dri_create_context(gl_api api, const struct gl_config * visual,
__DRIcontext * cPriv, void *sharedContextPrivate)
{
__DRIscreen *sPriv = cPriv->driScreenPriv;
boolean
dri_create_context(gl_api api,
- const __GLcontextModes * visual,
+ const struct gl_config * visual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
boolean
dri_create_buffer(__DRIscreen * sPriv,
__DRIdrawable * dPriv,
- const __GLcontextModes * visual, boolean isPixmap)
+ const struct gl_config * visual, boolean isPixmap)
{
struct dri_screen *screen = sPriv->private;
struct dri_drawable *drawable = NULL;
boolean
dri_create_buffer(__DRIscreen * sPriv,
__DRIdrawable * dPriv,
- const __GLcontextModes * visual, boolean isPixmap);
+ const struct gl_config * visual, boolean isPixmap);
void dri_destroy_buffer(__DRIdrawable * dPriv);
*/
void
dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
- const __GLcontextModes *mode)
+ const struct gl_config *mode)
{
memset(stvis, 0, sizeof(*stvis));
void
dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
- const __GLcontextModes *mode);
+ const struct gl_config *mode);
const __DRIconfig **
dri_init_screen_helper(struct dri_screen *screen,
/**
* This is the driver specific part of the createNewScreen entry point.
*
- * Returns the __GLcontextModes supported by this driver.
+ * Returns the struct gl_config supported by this driver.
*/
static const __DRIconfig **
dri2_init_screen(__DRIscreen * sPriv)
}
static boolean
-dri2_create_context(gl_api api, const __GLcontextModes * visual,
+dri2_create_context(gl_api api, const struct gl_config * visual,
__DRIcontext * cPriv, void *sharedContextPrivate)
{
struct dri_context *ctx = NULL;
static boolean
dri2_create_buffer(__DRIscreen * sPriv,
__DRIdrawable * dPriv,
- const __GLcontextModes * visual, boolean isPixmap)
+ const struct gl_config * visual, boolean isPixmap)
{
struct dri_drawable *drawable = NULL;
static boolean
drisw_create_buffer(__DRIscreen * sPriv,
__DRIdrawable * dPriv,
- const __GLcontextModes * visual, boolean isPixmap)
+ const struct gl_config * visual, boolean isPixmap)
{
struct dri_drawable *drawable = NULL;
/* initialize visual */
{
- __GLcontextModes *vis = &v->mesa_visual;
+ struct gl_config *vis = &v->mesa_visual;
vis->rgbMode = GL_TRUE;
vis->doubleBufferMode = db_flag;
* Basically corresponds to an XVisualInfo.
*/
struct xmesa_visual {
- GLvisual mesa_visual; /* Device independent visual parameters */
+ struct gl_config mesa_visual;/* Device independent visual parameters */
int screen, visualID, visualType;
Display *display; /* The X11 display */
XVisualInfo * visinfo; /* X's visual info (pointer to private copy) */
MesaDriver();
~MesaDriver();
- void Init(BGLView * bglview, GLcontext * c, GLvisual * v, GLframebuffer * b);
+ void Init(BGLView * bglview, GLcontext * c, struct gl_config * v, GLframebuffer * b);
void LockGL();
void UnlockGL();
MesaDriver &operator=(const MesaDriver &rhs); // assignment oper. illegal
GLcontext * m_glcontext;
- GLvisual * m_glvisual;
+ struct gl_config * m_glvisual;
GLframebuffer * m_glframebuffer;
BGLView * m_bglview;
MesaDriver * md = new MesaDriver();
// examine option flags and create gl_context struct
- GLvisual * visual = _mesa_create_visual( dblFlag,
+ struct gl_config * visual = _mesa_create_visual( dblFlag,
stereoFlag,
red, green, blue, alpha,
depth,
}
-void MesaDriver::Init(BGLView * bglview, GLcontext * ctx, GLvisual * visual, GLframebuffer * framebuffer)
+void MesaDriver::Init(BGLView * bglview, GLcontext * ctx, struct gl_config * visual, GLframebuffer * framebuffer)
{
m_bglview = bglview;
m_glcontext = ctx;
__DRIcontext *shared, void *data)
{
__DRIcontext *context;
- const __GLcontextModes *modes = (config != NULL) ? &config->modes : NULL;
+ const struct gl_config *modes = (config != NULL) ? &config->modes : NULL;
void *shareCtx = (shared != NULL) ? shared->driverPrivate : NULL;
gl_api mesa_api;
* This is the bootstrap function for the driver. libGL supplies all of the
* requisite information about the system, and the driver initializes itself.
* This routine also fills in the linked list pointed to by \c driver_modes
- * with the \c __GLcontextModes that the driver can support for windows or
+ * with the \c struct gl_config that the driver can support for windows or
* pbuffers.
*
* For legacy DRI.
* Context creation callback
*/
GLboolean (*CreateContext)(gl_api api,
- const __GLcontextModes *glVis,
+ const struct gl_config *glVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
*/
GLboolean (*CreateBuffer)(__DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *glVis,
+ const struct gl_config *glVis,
GLboolean pixmapBuffer);
/**
void (*DestroyScreen)(__DRIscreen *driScrnPriv);
GLboolean (*CreateContext)(gl_api glapi,
- const __GLcontextModes *glVis,
+ const struct gl_config *glVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
GLboolean (*CreateBuffer)(__DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *glVis,
+ const struct gl_config *glVis,
GLboolean pixmapBuffer);
void (*DestroyBuffer)(__DRIdrawable *driDrawPriv);
}
/**
- * Creates a set of \c __GLcontextModes that a driver will expose.
+ * Creates a set of \c struct gl_config that a driver will expose.
*
- * A set of \c __GLcontextModes will be created based on the supplied
+ * A set of \c struct gl_config will be created based on the supplied
* parameters. The number of modes processed will be 2 *
* \c num_depth_stencil_bits * \c num_db_modes.
*
* For the most part, data is just copied from \c depth_bits, \c stencil_bits,
- * \c db_modes, and \c visType into each \c __GLcontextModes element.
+ * \c db_modes, and \c visType into each \c struct gl_config element.
* However, the meanings of \c fb_format and \c fb_type require further
* explanation. The \c fb_format specifies which color components are in
* each pixel and what the default order is. For example, \c GL_RGB specifies
*
* One sublte issue is the combination of \c GL_RGB or \c GL_BGR and either
* of the \c GL_UNSIGNED_INT_8_8_8_8 modes. The resulting mask values in the
- * \c __GLcontextModes structure is \b identical to the \c GL_RGBA or
+ * \c struct gl_config structure is \b identical to the \c GL_RGBA or
* \c GL_BGRA case, except the \c alphaMask is zero. This means that, as
* far as this routine is concerned, \c GL_RGB with \c GL_UNSIGNED_INT_8_8_8_8
* still uses 32-bits.
* If in doubt, look at the tables used in the function.
*
* \param ptr_to_modes Pointer to a pointer to a linked list of
- * \c __GLcontextModes. Upon completion, a pointer to
+ * \c struct gl_config. Upon completion, a pointer to
* the next element to be process will be stored here.
* If the function fails and returns \c GL_FALSE, this
* value will be unmodified, but some elements in the
const uint32_t * masks;
int index;
__DRIconfig **configs, **c;
- __GLcontextModes *modes;
+ struct gl_config *modes;
unsigned i, j, k, h;
unsigned num_modes;
unsigned num_accum_bits = (enable_accum) ? 2 : 1;
}
#define __ATTRIB(attrib, field) \
- { attrib, offsetof(__GLcontextModes, field) }
+ { attrib, offsetof(struct gl_config, field) }
static const struct { unsigned int attrib, offset; } attribMap[] = {
__ATTRIB(__DRI_ATTRIB_BUFFER_SIZE, rgbBits),
GLsizei *width, GLsizei *height );
struct __DRIconfigRec {
- __GLcontextModes modes;
+ struct gl_config modes;
};
extern __DRIconfig **
GLboolean
i810CreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
unsigned i;
static GLboolean
i810CreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
i810ScreenPrivate *screen = (i810ScreenPrivate *) driScrnPriv->private;
extern GLboolean
i810CreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-i810SetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+i810SetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.InternalFormat == GL_RGBA) {
/* always 565 RGB */
extern void i810SpanRenderStart( GLcontext *ctx );
extern void
-i810SetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+i810SetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
extern const struct tnl_pipeline_stage *intel_pipeline[];
GLboolean
-i830CreateContext(const __GLcontextModes * mesaVis,
+i830CreateContext(const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
/* i830_context.c
*/
extern GLboolean
-i830CreateContext(const __GLcontextModes * mesaVis,
+i830CreateContext(const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
GLboolean
i915CreateContext(int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
* i915_context.c
*/
extern GLboolean i915CreateContext(int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
}
GLboolean brwCreateContext( int api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
* brw_context.c
*/
GLboolean brwCreateContext( int api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
GLboolean
intelInitContext(struct intel_context *intel,
int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate,
struct dd_function_table *functions)
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
struct intel_screen *intelScreen = sPriv->private;
int bo_reuse_mode;
- __GLcontextModes visual;
+ struct gl_config visual;
/* we can't do anything without a connection to the device */
if (intelScreen->bufmgr == NULL)
extern GLboolean intelInitContext(struct intel_context *intel,
int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate,
struct dd_function_table *functions);
static GLboolean
intelCreateBuffer(__DRIscreen * driScrnPriv,
__DRIdrawable * driDrawPriv,
- const __GLcontextModes * mesaVis, GLboolean isPixmap)
+ const struct gl_config * mesaVis, GLboolean isPixmap)
{
struct intel_renderbuffer *rb;
* init-designated function to register chipids and createcontext
* functions.
*/
-extern GLboolean i830CreateContext(const __GLcontextModes * mesaVis,
+extern GLboolean i830CreateContext(const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
extern GLboolean i915CreateContext(int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
extern GLboolean brwCreateContext(int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
static GLboolean
intelCreateContext(gl_api api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
* This is the driver specific part of the createNewScreen entry point.
* Called when using DRI2.
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const
__DRIconfig **intelInitScreen2(__DRIscreen *psp)
/* Create the device specific context.
*/
GLboolean mach64CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
extern GLboolean mach64CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
GLenum fb_format;
GLenum fb_type;
unsigned depth_buffer_factor;
static GLboolean
mach64CreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
mach64ScreenPtr screen = (mach64ScreenPtr) driScrnPriv->private;
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
mach64InitScreen(__DRIscreen *psp)
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-mach64SetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+mach64SetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
mach64InitPointers_RGB565(&drb->Base);
extern void mach64DDInitSpanFuncs( GLcontext *ctx );
extern void
-mach64SetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+mach64SetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
static GLboolean
mgaCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
static GLboolean
mgaCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
mgaScreenPrivate *screen = (mgaScreenPrivate *) driScrnPriv->private;
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **mgaInitScreen(__DRIscreen *psp)
{
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-mgaSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+mgaSetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
mgaInitPointers_565(&drb->Base);
extern void mgaDDInitSpanFuncs( GLcontext *ctx );
extern void
-mgaSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+mgaSetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
GLboolean
nouveau_context_create(gl_api api,
- const __GLcontextModes *visual, __DRIcontext *dri_ctx,
+ const struct gl_config *visual, __DRIcontext *dri_ctx,
void *share_ctx)
{
__DRIscreen *dri_screen = dri_ctx->driScreenPriv;
GLboolean
nouveau_context_init(GLcontext *ctx, struct nouveau_screen *screen,
- const GLvisual *visual, GLcontext *share_ctx)
+ const struct gl_config *visual, GLcontext *share_ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct dd_function_table functions;
GLboolean
nouveau_context_create(gl_api api,
- const __GLcontextModes *visual, __DRIcontext *dri_ctx,
+ const struct gl_config *visual, __DRIcontext *dri_ctx,
void *share_ctx);
GLboolean
nouveau_context_init(GLcontext *ctx, struct nouveau_screen *screen,
- const GLvisual *visual, GLcontext *share_ctx);
+ const struct gl_config *visual, GLcontext *share_ctx);
void
nouveau_context_deinit(GLcontext *ctx);
struct nouveau_driver {
GLcontext *(*context_create)(struct nouveau_screen *screen,
- const GLvisual *visual,
+ const struct gl_config *visual,
GLcontext *share_ctx);
void (*context_destroy)(GLcontext *ctx);
}
struct gl_framebuffer *
-nouveau_framebuffer_dri_new(const GLvisual *visual)
+nouveau_framebuffer_dri_new(const struct gl_config *visual)
{
struct nouveau_framebuffer *nfb;
#define to_nouveau_renderbuffer(x) ((struct nouveau_renderbuffer *)(x))
struct gl_framebuffer *
-nouveau_framebuffer_dri_new(const GLvisual *visual);
+nouveau_framebuffer_dri_new(const struct gl_config *visual);
struct gl_renderbuffer *
nouveau_renderbuffer_dri_new(GLenum format, __DRIdrawable *drawable);
static GLboolean
nouveau_create_buffer(__DRIscreen *dri_screen,
__DRIdrawable *drawable,
- const __GLcontextModes *visual,
+ const struct gl_config *visual,
GLboolean is_pixmap)
{
struct gl_renderbuffer *rb;
}
static GLcontext *
-nv04_context_create(struct nouveau_screen *screen, const GLvisual *visual,
+nv04_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
GLcontext *share_ctx)
{
struct nv04_context *nctx;
}
static GLcontext *
-nv10_context_create(struct nouveau_screen *screen, const GLvisual *visual,
+nv10_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
GLcontext *share_ctx)
{
struct nouveau_context *nctx;
}
static GLcontext *
-nv20_context_create(struct nouveau_screen *screen, const GLvisual *visual,
+nv20_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
GLcontext *share_ctx)
{
struct nouveau_context *nctx;
/* Create the device specific context.
*/
GLboolean r128CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
extern GLboolean r128CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
static GLboolean
r128CreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
r128ScreenPtr screen = (r128ScreenPtr) driScrnPriv->private;
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
r128InitScreen(__DRIscreen *psp)
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-r128SetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+r128SetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
r128InitPointers_RGB565(&drb->Base);
extern void r128DDInitSpanFuncs( GLcontext *ctx );
extern void
-r128SetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+r128SetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
/* Create the device specific rendering context.
*/
GLboolean r200CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
extern void r200DestroyContext( __DRIcontext *driContextPriv );
extern GLboolean r200CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
extern GLboolean r200MakeCurrent( __DRIcontext *driContextPriv,
/* Create the device specific rendering context.
*/
GLboolean r300CreateContext(gl_api api,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
extern void r300DestroyContext(__DRIcontext * driContextPriv);
extern GLboolean r300CreateContext(gl_api api,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
/* Create the device specific rendering context.
*/
GLboolean r600CreateContext(gl_api api,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
#define GET_EVERGREEN_CHIP(context) ((EVERGREEN_CHIP_CONTEXT*)(context->pChip))
extern GLboolean r600CreateContext(gl_api api,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
*/
GLboolean radeonInitContext(radeonContextPtr radeon,
struct dd_function_table* functions,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
GLboolean radeonInitContext(radeonContextPtr radeon,
struct dd_function_table* functions,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
*/
GLboolean
r100CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
#define RADEON_OLD_PACKETS 1
extern GLboolean r100CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes *m;
+ struct gl_config *m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
int i;
static GLboolean
radeonCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
radeonScreenPtr screen = (radeonScreenPtr) driScrnPriv->private;
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
radeonInitScreen(__DRIscreen *psp)
* This is the driver specific part of the createNewScreen entry point.
* Called when using DRI2.
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const
__DRIconfig **radeonInitScreen2(__DRIscreen *psp)
static GLboolean
savageCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
static GLboolean
savageCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap)
{
savageScreenPrivate *screen = (savageScreenPrivate *) driScrnPriv->private;
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
savageInitScreen(__DRIscreen *psp)
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-savageSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis,
+savageSetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis,
GLboolean float_depth)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
extern void savageDDInitSpanFuncs( GLcontext *ctx );
extern void
-savageSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis,
+savageSetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis,
GLboolean float_depth);
GLboolean
sisCreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
};
extern GLboolean sisCreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
extern void sisDestroyContext( __DRIcontext * );
static GLboolean
sisCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
/*sisScreenPtr screen = (sisScreenPtr) driScrnPriv->private;*/
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
sisInitScreen(__DRIscreen *psp)
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-sisSetSpanFunctions(struct sis_renderbuffer *srb, const GLvisual *vis)
+sisSetSpanFunctions(struct sis_renderbuffer *srb, const struct gl_config *vis)
{
if (srb->Base.Format == MESA_FORMAT_RGB565) {
sisInitPointers_RGB565( &srb->Base );
extern void sisDDInitSpanFuncs( GLcontext *ctx );
extern void
-sisSetSpanFunctions(struct sis_renderbuffer *srb, const GLvisual *vis);
+sisSetSpanFunctions(struct sis_renderbuffer *srb, const struct gl_config *vis);
#endif
*/
static GLuint
-choose_pixel_format(const GLvisual *v)
+choose_pixel_format(const struct gl_config *v)
{
int depth = v->rgbBits;
}
static struct swrast_renderbuffer *
-swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
+swrast_new_renderbuffer(const struct gl_config *visual, GLboolean front)
{
struct swrast_renderbuffer *xrb = calloc(1, sizeof *xrb);
GLuint pixel_format;
static GLboolean
dri_create_buffer(__DRIscreen * sPriv,
__DRIdrawable * dPriv,
- const __GLcontextModes * visual, GLboolean isPixmap)
+ const struct gl_config * visual, GLboolean isPixmap)
{
struct dri_drawable *drawable = NULL;
GLframebuffer *fb;
static GLboolean
dri_create_context(gl_api api,
- const __GLcontextModes * visual,
+ const struct gl_config * visual,
__DRIcontext * cPriv, void *sharedContextPrivate)
{
struct dri_context *ctx = NULL;
};
GLboolean tdfxCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
extern GLboolean
tdfxCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
(vis->blueBits == b) && \
(vis->alphaBits == a))
-void tdfxDDInitDriverFuncs( const __GLcontextModes *visual,
+void tdfxDDInitDriverFuncs( const struct gl_config *visual,
struct dd_function_table *functions )
{
if ( MESA_VERBOSE & VERBOSE_DRIVER ) {
#include "main/context.h"
-extern void tdfxDDInitDriverFuncs( const __GLcontextModes *visual,
+extern void tdfxDDInitDriverFuncs( const struct gl_config *visual,
struct dd_function_table *functions );
#endif
static GLboolean
tdfxCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
tdfxScreenPrivate *screen = (tdfxScreenPrivate *) driScrnPriv->private;
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
tdfxInitScreen(__DRIscreen *psp)
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-tdfxSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+tdfxSetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.InternalFormat == GL_RGBA) {
if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) {
extern void tdfxDDInitSpanFuncs( GLcontext *ctx );
extern void
-tdfxSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+tdfxSetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
GLboolean
viaCreateContext(gl_api api,
- const __GLcontextModes *visual,
+ const struct gl_config *visual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
static GLboolean
viaCreateBuffer(__DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap)
{
#if 0
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
viaInitScreen(__DRIscreen *psp)
extern GLboolean
viaCreateContext(gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-viaSetSpanFunctions(struct via_renderbuffer *vrb, const GLvisual *vis)
+viaSetSpanFunctions(struct via_renderbuffer *vrb, const struct gl_config *vis)
{
if (vrb->Base.Format == MESA_FORMAT_RGB565) {
viaInitPointers_565(&vrb->Base);
extern void viaSpanRenderFinish( GLcontext *ctx );
extern void
-viaSetSpanFunctions(struct via_renderbuffer *vrb, const GLvisual *vis);
+viaSetSpanFunctions(struct via_renderbuffer *vrb, const struct gl_config *vis);
#endif
/**
- * Derived from Mesa's GLvisual class.
+ * Derived from Mesa's struct gl_config class.
*/
struct GLFBDevVisualRec {
- GLvisual glvisual; /* base class */
+ struct gl_config glvisual; /* base class */
struct fb_fix_screeninfo fix;
struct fb_var_screeninfo var;
int pixelFormat;
struct osmesa_context
{
GLcontext mesa; /*< Base class - this must be first */
- GLvisual *gl_visual; /*< Describes the buffers */
+ struct gl_config *gl_visual; /*< Describes the buffers */
struct gl_renderbuffer *rb; /*< The user's colorbuffer */
GLframebuffer *gl_buffer; /*< The framebuffer, containing user's rb */
GLenum format; /*< User-specified context format */
* given HDC (Window handle).
*/
WMesaFramebuffer
-wmesa_new_framebuffer(HDC hdc, GLvisual *visual)
+wmesa_new_framebuffer(HDC hdc, struct gl_config *visual)
{
WMesaFramebuffer pwfb
= (WMesaFramebuffer) malloc(sizeof(struct wmesa_framebuffer));
struct dd_function_table functions;
GLint red_bits, green_bits, blue_bits, alpha_bits;
GLcontext *ctx;
- GLvisual *visual;
+ struct gl_config *visual;
(void) Pal;
/* Lazy creation of framebuffers */
if (c && !pwfb && hdc) {
struct gl_renderbuffer *rb;
- GLvisual *visual = &c->gl_ctx.Visual;
+ struct gl_config *visual = &c->gl_ctx.Visual;
GLuint width, height;
get_window_size(hdc, &width, &height);
// Mesa vars:
GLcontext *glCtx; // The core Mesa context
- GLvisual *glVis; // Describes the color buffer
+ struct gl_config *glVis; // Describes the color buffer
GLframebuffer *glBuffer; // Ancillary buffers
GLuint ClearIndex;
// Mesa context vars:
//
GLcontext *glCtx; // The core Mesa context
- GLvisual *glVis; // Describes the color buffer
+ struct gl_config *glVis; // Describes the color buffer
GLframebuffer *glBuffer; // Ancillary buffers
GLuint ClearIndex;
struct xmesa_renderbuffer *
-xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
+xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const struct gl_config *visual,
GLboolean backBuffer)
{
struct xmesa_renderbuffer *xrb = CALLOC_STRUCT(xmesa_renderbuffer);
/**
- * Visual inforation, derived from GLvisual.
+ * Visual inforation, derived from struct gl_config.
* Basically corresponds to an XVisualInfo.
*/
struct xmesa_visual {
- GLvisual mesa_visual; /* Device independent visual parameters */
+ struct gl_config mesa_visual; /* Device independent visual parameters */
XMesaDisplay *display; /* The X11 display */
int screen, visualID;
#ifdef XFree86Server
*/
extern struct xmesa_renderbuffer *
-xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
+xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const struct gl_config *visual,
GLboolean backBuffer);
extern void
/*@{*/
/**
- * 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
* \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,
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,
/**
* 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,
* Frees the visual structure.
*/
void
-_mesa_destroy_visual( GLvisual *vis )
+_mesa_destroy_visual( struct gl_config *vis )
{
free(vis);
}
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)
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)
* 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.
*/
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)
}
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)
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;
* 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.
* 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.
/** \name Visual-related functions */
/*@{*/
-extern GLvisual *
+extern struct gl_config *
_mesa_create_visual( GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
GLint numSamples );
extern GLboolean
-_mesa_initialize_visual( GLvisual *v,
+_mesa_initialize_visual( struct gl_config *v,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
GLint numSamples );
extern void
-_mesa_destroy_visual( GLvisual *vis );
+_mesa_destroy_visual( struct gl_config *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);
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);
* \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);
*/
void
_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb,
- const GLvisual *visual)
+ const struct gl_config *visual)
{
assert(fb);
assert(visual);
#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);
*/
#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.
*/
struct gl_texture_object;
struct st_context;
typedef struct __GLcontextRec GLcontext;
-typedef struct __GLcontextModesRec GLvisual;
typedef struct gl_framebuffer GLframebuffer;
/*@}*/
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;
GLint bindToMipmapTexture;
GLint bindToTextureTargets;
GLint yInverted;
-} __GLcontextModes;
+};
/**
* Light source state.
* 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;
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 */
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
- const __GLcontextModes *visual,
+ const struct gl_config *visual,
struct st_context *share)
{
GLcontext *ctx;
extern struct st_context *
st_create_context(gl_api api, struct pipe_context *pipe,
- const __GLcontextModes *visual,
+ const struct gl_config *visual,
struct st_context *share);
extern void
}
/**
- * Intialize a __GLcontextModes from a visual.
+ * Intialize a struct gl_config from a visual.
*/
static void
st_visual_to_context_mode(const struct st_visual *visual,
- __GLcontextModes *mode)
+ struct gl_config *mode)
{
memset(mode, 0, sizeof(*mode));
st_framebuffer_create(struct st_framebuffer_iface *stfbi)
{
struct st_framebuffer *stfb;
- __GLcontextModes mode;
+ struct gl_config mode;
gl_buffer_index idx;
stfb = CALLOC_STRUCT(st_framebuffer);
struct st_context *shared_ctx = (struct st_context *) shared_stctxi;
struct st_context *st;
struct pipe_context *pipe;
- __GLcontextModes mode;
+ struct gl_config mode;
gl_api api;
if (!(stapi->profile_mask & (1 << attribs->profile)))