Lines Matching full:ctx
43 clear_rgba_buffer(struct gl_context *ctx, struct gl_renderbuffer *rb,
46 const GLint x = ctx->DrawBuffer->_Xmin;
47 const GLint y = ctx->DrawBuffer->_Ymin;
48 const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
49 const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
56 (const GLfloat (*)[4]) ctx->Color.ClearColor.f;
68 ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height,
71 _mesa_error(ctx, GL_OUT_OF_MEMORY, "glClear(color)");
162 _mesa_problem(ctx, "bad pixel size in clear_rgba_buffer()");
166 ctx->Driver.UnmapRenderbuffer(ctx, rb);
176 clear_color_buffers(struct gl_context *ctx)
180 for (buf = 0; buf < ctx->DrawBuffer->_NumColorDrawBuffers; buf++) {
181 struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[buf];
190 clear_rgba_buffer(ctx, rb, ctx->Color.ColorMask[buf]);
196 * Called via the device driver's ctx->Driver.Clear() function if the
203 _swrast_Clear(struct gl_context *ctx, GLbitfield buffers)
222 if (!_mesa_check_conditional_render(ctx))
225 if (SWRAST_CONTEXT(ctx)->NewState)
226 _swrast_validate_derived(ctx);
229 && (ctx->DrawBuffer->_NumColorDrawBuffers > 0)) {
230 clear_color_buffers(ctx);
234 _mesa_clear_accum_buffer(ctx);
239 ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer;
241 ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Renderbuffer;
245 _swrast_clear_depth_stencil_buffer(ctx);
250 _swrast_clear_depth_buffer(ctx);
253 _swrast_clear_stencil_buffer(ctx);