__ATTRIB(__DRI_ATTRIB_BLUE_SIZE, blueBits);
case __DRI_ATTRIB_LEVEL:
case __DRI_ATTRIB_LUMINANCE_SIZE:
+ case __DRI_ATTRIB_AUX_BUFFERS:
*value = 0;
break;
__ATTRIB(__DRI_ATTRIB_ALPHA_SIZE, alphaBits);
break;
__ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode);
__ATTRIB(__DRI_ATTRIB_STEREO, stereoMode);
- __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers);
case __DRI_ATTRIB_TRANSPARENT_TYPE:
case __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE: /* horrible bc hack */
*value = GLX_NONE;
[BUFFER_DEPTH] = "depth",
[BUFFER_STENCIL] = "stencil",
[BUFFER_ACCUM] = "accum",
- [BUFFER_AUX0] = "aux0",
[BUFFER_COLOR0] = "color0",
[BUFFER_COLOR1] = "color1",
[BUFFER_COLOR2] = "color2",
false, /* never sw depth */
false, /* never sw stencil */
mesaVis->accumRedBits > 0,
- false, /* never sw alpha */
- false /* never sw aux */ );
+ false /* never sw alpha */);
driDrawPriv->driverPrivate = fb;
return true;
[BUFFER_DEPTH] = "depth",
[BUFFER_STENCIL] = "stencil",
[BUFFER_ACCUM] = "accum",
- [BUFFER_AUX0] = "aux0",
[BUFFER_COLOR0] = "color0",
[BUFFER_COLOR1] = "color1",
[BUFFER_COLOR2] = "color2",
false, /* never sw depth */
false, /* never sw stencil */
mesaVis->accumRedBits > 0,
- false, /* never sw alpha */
- false /* never sw aux */ );
+ false /* never sw alpha */);
driDrawPriv->driverPrivate = fb;
return true;
/* Software renderbuffers. */
_swrast_add_soft_renderbuffers(fb, GL_FALSE, GL_FALSE, GL_FALSE,
visual->accumRedBits > 0,
- GL_FALSE, GL_FALSE);
+ GL_FALSE);
drawable->driverPrivate = fb;
swDepth,
swStencil,
swAccum,
- swAlpha,
- GL_FALSE /* aux */);
+ swAlpha);
driDrawPriv->driverPrivate = (void *) rfb;
return (driDrawPriv->driverPrivate != NULL);
}
else {
/* A window system framebuffer */
- GLint i;
mask = BUFFER_BIT_FRONT_LEFT; /* always have this */
if (fb->Visual.stereoMode) {
mask |= BUFFER_BIT_FRONT_RIGHT;
else if (fb->Visual.doubleBufferMode) {
mask |= BUFFER_BIT_BACK_LEFT;
}
-
- for (i = 0; i < fb->Visual.numAuxBuffers; i++) {
- mask |= (BUFFER_BIT_AUX0 << i);
- }
}
return mask;
case GL_FRONT_LEFT:
return BUFFER_BIT_FRONT_LEFT;
case GL_AUX0:
- return BUFFER_BIT_AUX0;
case GL_AUX1:
case GL_AUX2:
case GL_AUX3:
return BUFFER_FRONT_LEFT;
case GL_FRONT_LEFT:
return BUFFER_FRONT_LEFT;
- case GL_AUX0:
- return BUFFER_AUX0;
case GL_FRONT_AND_BACK:
return BUFFER_FRONT_LEFT;
+ case GL_AUX0:
case GL_AUX1:
case GL_AUX2:
case GL_AUX3:
vis->accumBlueBits = accumBlueBits;
vis->accumAlphaBits = accumAlphaBits;
- vis->numAuxBuffers = 0;
vis->sampleBuffers = numSamples > 0 ? 1 : 0;
vis->samples = numSamples;
return &fb->Attachment[BUFFER_BACK_LEFT];
return NULL;
case GL_AUX0:
- if (fb->Visual.numAuxBuffers == 1) {
- return &fb->Attachment[BUFFER_AUX0];
- }
return NULL;
/* Page 336 (page 352 of the PDF) of the OpenGL 3.0 spec says:
[ "ALPHA_SCALE", "CONTEXT_FLOAT(Pixel.AlphaScale), NO_EXTRA" ],
[ "ATTRIB_STACK_DEPTH", "CONTEXT_INT(AttribStackDepth), NO_EXTRA" ],
[ "AUTO_NORMAL", "CONTEXT_BOOL(Eval.AutoNormal), NO_EXTRA" ],
- [ "AUX_BUFFERS", "BUFFER_INT(Visual.numAuxBuffers), NO_EXTRA" ],
+ [ "AUX_BUFFERS", "CONST(0), NO_EXTRA" ],
[ "BLUE_BIAS", "CONTEXT_FLOAT(Pixel.BlueBias), NO_EXTRA" ],
[ "BLUE_SCALE", "CONTEXT_FLOAT(Pixel.BlueScale), NO_EXTRA" ],
[ "CLIENT_ATTRIB_STACK_DEPTH", "CONTEXT_INT(ClientAttribStackDepth), NO_EXTRA" ],
BUFFER_DEPTH,
BUFFER_STENCIL,
BUFFER_ACCUM,
- /* optional aux buffer */
- BUFFER_AUX0,
/* generic renderbuffers */
BUFFER_COLOR0,
BUFFER_COLOR1,
#define BUFFER_BIT_BACK_LEFT (1 << BUFFER_BACK_LEFT)
#define BUFFER_BIT_FRONT_RIGHT (1 << BUFFER_FRONT_RIGHT)
#define BUFFER_BIT_BACK_RIGHT (1 << BUFFER_BACK_RIGHT)
-#define BUFFER_BIT_AUX0 (1 << BUFFER_AUX0)
-#define BUFFER_BIT_AUX1 (1 << BUFFER_AUX1)
-#define BUFFER_BIT_AUX2 (1 << BUFFER_AUX2)
-#define BUFFER_BIT_AUX3 (1 << BUFFER_AUX3)
#define BUFFER_BIT_DEPTH (1 << BUFFER_DEPTH)
#define BUFFER_BIT_STENCIL (1 << BUFFER_STENCIL)
#define BUFFER_BIT_ACCUM (1 << BUFFER_ACCUM)
BUFFER_BIT_BACK_LEFT | \
BUFFER_BIT_FRONT_RIGHT | \
BUFFER_BIT_BACK_RIGHT | \
- BUFFER_BIT_AUX0 | \
BUFFER_BIT_COLOR0 | \
BUFFER_BIT_COLOR1 | \
BUFFER_BIT_COLOR2 | \
GLint depthBits;
GLint stencilBits;
- GLint numAuxBuffers;
-
/* EXT_visual_rating / GLX 1.2 */
GLint visualRating;
BUFFER_BIT_BACK_RIGHT |
BUFFER_BIT_DEPTH |
BUFFER_BIT_STENCIL |
- BUFFER_BIT_ACCUM |
- BUFFER_BIT_AUX0;
+ BUFFER_BIT_ACCUM;
assert((buffers & (~legalBits)) == 0);
}
#endif
/**
- * Add a software-based aux renderbuffer to the given framebuffer.
- * This is a helper routine for device drivers when creating a
- * window system framebuffer (not a user-created render/framebuffer).
- * Once this function is called, you can basically forget about this
- * renderbuffer; core Mesa will handle all the buffer management and
- * rendering!
- *
- * NOTE: color-index aux buffers not supported.
- */
-static GLboolean
-add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
- GLuint colorBits, GLuint numBuffers)
-{
- GLuint i;
-
- if (colorBits > 16) {
- _mesa_problem(ctx,
- "Unsupported colorBits in add_aux_renderbuffers");
- return GL_FALSE;
- }
-
- assert(numBuffers <= MAX_AUX_BUFFERS);
-
- for (i = 0; i < numBuffers; i++) {
- struct gl_renderbuffer *rb = _swrast_new_soft_renderbuffer(ctx, 0);
-
- assert(fb->Attachment[BUFFER_AUX0 + i].Renderbuffer == NULL);
-
- if (!rb) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating aux buffer");
- return GL_FALSE;
- }
-
- assert (colorBits <= 8);
- rb->InternalFormat = GL_RGBA;
-
- rb->AllocStorage = soft_renderbuffer_storage;
- _mesa_attach_and_own_rb(fb, BUFFER_AUX0 + i, rb);
- }
- return GL_TRUE;
-}
-
-
-/**
* Create/attach software-based renderbuffers to the given framebuffer.
* This is a helper routine for device drivers. Drivers can just as well
* call the individual _mesa_add_*_renderbuffer() routines directly.
GLboolean depth,
GLboolean stencil,
GLboolean accum,
- GLboolean alpha,
- GLboolean aux)
+ GLboolean alpha)
{
GLboolean frontLeft = GL_TRUE;
GLboolean backLeft = fb->Visual.doubleBufferMode;
fb->Visual.accumBlueBits,
fb->Visual.accumAlphaBits);
}
-
- if (aux) {
- assert(fb->Visual.numAuxBuffers > 0);
- add_aux_renderbuffers(NULL, fb, fb->Visual.redBits,
- fb->Visual.numAuxBuffers);
- }
-
-#if 0
- if (multisample) {
- /* maybe someday */
- }
-#endif
}
GLboolean depth,
GLboolean stencil,
GLboolean accum,
- GLboolean alpha,
- GLboolean aux);
+ GLboolean alpha);
#endif /* S_RENDERBUFFER_H */