Lines Matching refs:DrawBuffer
183 if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
189 if (ctx->DrawBuffer->Width == 0 || ctx->DrawBuffer->Height == 0 ||
190 ctx->DrawBuffer->_Xmin >= ctx->DrawBuffer->_Xmax ||
191 ctx->DrawBuffer->_Ymin >= ctx->DrawBuffer->_Ymax)
212 for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
213 bufferMask |= (1 << ctx->DrawBuffer->_ColorDrawBufferIndexes[i]);
218 && ctx->DrawBuffer->Visual.haveDepthBuffer) {
223 && ctx->DrawBuffer->Visual.haveStencilBuffer) {
228 && ctx->DrawBuffer->Visual.haveAccumBuffer) {
243 * Convert the glClearBuffer 'drawbuffer' parameter into a bitmask of
245 * Return INVALID_MASK if the drawbuffer value is invalid.
248 make_color_buffer_mask(struct gl_context *ctx, GLint drawbuffer)
250 const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment;
253 switch (drawbuffer) {
289 if (drawbuffer < 0 || drawbuffer >= (GLint)ctx->Const.MaxDrawBuffers) {
292 else if (att[BUFFER_COLOR0 + drawbuffer].Renderbuffer) {
293 mask |= (BUFFER_BIT_COLOR0 << drawbuffer);
307 _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
323 * COLOR and drawbuffer is less than zero, or greater than the
325 * STENCIL, or DEPTH STENCIL and drawbuffer is not zero."
327 if (drawbuffer != 0) {
328 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)",
329 drawbuffer);
332 else if (ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Renderbuffer && !ctx->RasterDiscard) {
346 const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer);
348 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)",
349 drawbuffer);
377 * drawbuffer case (see the GL_STENCIL case above).
379 if (drawbuffer != 0) {
380 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)",
381 drawbuffer);
398 _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
412 const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer);
414 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferuiv(drawbuffer=%d)",
415 drawbuffer);
449 * drawbuffer case (see the GL_STENCIL case in _mesa_ClearBufferiv).
451 if (drawbuffer != 0) {
452 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferuiv(drawbuffer=%d)",
453 drawbuffer);
470 _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
486 * COLOR and drawbuffer is less than zero, or greater than the
488 * STENCIL, or DEPTH STENCIL and drawbuffer is not zero."
490 if (drawbuffer != 0) {
491 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfv(drawbuffer=%d)",
492 drawbuffer);
495 else if (ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer && !ctx->RasterDiscard) {
510 const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer);
512 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfv(drawbuffer=%d)",
513 drawbuffer);
541 * drawbuffer case (see the GL_DEPTH case above).
543 if (drawbuffer != 0) {
544 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfv(drawbuffer=%d)",
545 drawbuffer);
562 _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,
581 * COLOR and drawbuffer is less than zero, or greater than the
583 * STENCIL, or DEPTH STENCIL and drawbuffer is not zero."
585 if (drawbuffer != 0) {
586 _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfi(drawbuffer=%d)",
587 drawbuffer);
598 if (ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer)
600 if (ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Renderbuffer)