The extra params we unused by the drivers that used DrawBuffers.
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
driver->ColorMaterial = NULL;
driver->CullFace = NULL;
driver->DrawBuffer = NULL;
- driver->DrawBuffers = NULL;
driver->FrontFace = NULL;
driver->DepthFunc = NULL;
driver->DepthMask = NULL;
}
static void
-nouveau_draw_buffers(struct gl_context *ctx, GLsizei n, const GLenum *buffers)
+nouveau_draw_buffer(struct gl_context *ctx, GLenum buffer)
{
nouveau_validate_framebuffer(ctx);
context_dirty(ctx, FRAMEBUFFER);
ctx->Driver.DepthFunc = nouveau_depth_func;
ctx->Driver.DepthMask = nouveau_depth_mask;
ctx->Driver.ReadBuffer = nouveau_read_buffer;
- ctx->Driver.DrawBuffers = nouveau_draw_buffers;
+ ctx->Driver.DrawBuffer = nouveau_draw_buffer;
ctx->Driver.Enable = nouveau_enable;
ctx->Driver.Fogfv = nouveau_fog;
ctx->Driver.Lightfv = nouveau_light;
/* Call device driver function only if fb is the bound draw buffer */
if (fb == ctx->DrawBuffer) {
- if (ctx->Driver.DrawBuffers)
- ctx->Driver.DrawBuffers(ctx, 1, &buffer);
- else if (ctx->Driver.DrawBuffer)
+ if (ctx->Driver.DrawBuffer)
ctx->Driver.DrawBuffer(ctx, buffer);
}
}
* may not be valid.
*/
if (fb == ctx->DrawBuffer) {
- if (ctx->Driver.DrawBuffers)
- ctx->Driver.DrawBuffers(ctx, n, buffers);
- else if (ctx->Driver.DrawBuffer)
+ if (ctx->Driver.DrawBuffer)
ctx->Driver.DrawBuffer(ctx, n > 0 ? buffers[0] : GL_NONE);
}
}
void (*DepthRange)(struct gl_context *ctx);
/** Specify the current buffer for writing */
void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
- /** Specify the buffers for writing for fragment programs*/
- void (*DrawBuffers)(struct gl_context *ctx, GLsizei n, const GLenum *buffers);
/** Enable or disable server-side gl capabilities */
void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
/** Specify fog parameters */
* created FBOs.
*/
static void
-st_DrawBuffers(struct gl_context *ctx, GLsizei count, const GLenum *buffers)
+st_DrawBuffer(struct gl_context *ctx, GLenum buffer)
{
struct st_context *st = st_context(ctx);
struct gl_framebuffer *fb = ctx->DrawBuffer;
- (void) count;
- (void) buffers;
+ (void) buffer;
if (_mesa_is_winsys_fbo(fb)) {
GLuint i;
/**
- * Called via glReadBuffer. As with st_DrawBuffers, we use this function
+ * Called via glReadBuffer. As with st_DrawBuffer, we use this function
* to check if we need to allocate a renderbuffer on demand.
*/
static void
functions->FinishRenderTexture = st_finish_render_texture;
functions->ValidateFramebuffer = st_validate_framebuffer;
- functions->DrawBuffers = st_DrawBuffers;
+ functions->DrawBuffer = st_DrawBuffer;
functions->ReadBuffer = st_ReadBuffer;
functions->MapRenderbuffer = st_MapRenderbuffer;