#include "main/bufferobj.h"
#include "main/context.h"
#include "main/colormac.h"
+#include "main/fbobject.h"
#include "main/macros.h"
#include "main/image.h"
#include "main/imports.h"
const int xclass = xmesa->xm_visual->visualType;
(void) amask;
- if (ctx->DrawBuffer->Name != 0)
+ if (_mesa_is_user_fbo(ctx->DrawBuffer))
return;
xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
static void
clear_buffers(struct gl_context *ctx, GLbitfield buffers)
{
- if (ctx->DrawBuffer->Name == 0) {
+ if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
/* this is a window system framebuffer */
const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask[0];
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (format == GL_BGRA &&
type == GL_UNSIGNED_BYTE &&
ctx->DrawBuffer &&
- ctx->DrawBuffer->Name == 0 &&
+ _mesa_is_winsys_fbo(ctx->DrawBuffer) &&
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
ctx->Pixel.ZoomY == 1.0 &&
ctx->_ImageTransferState == 0 /* no color tables, scale/bias, etc */) {
type == GL_UNSIGNED_SHORT_5_6_5 &&
!ctx->Color.DitherFlag && /* no dithering */
ctx->DrawBuffer &&
- ctx->DrawBuffer->Name == 0 &&
+ _mesa_is_winsys_fbo(ctx->DrawBuffer) &&
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
ctx->Pixel.ZoomY == 1.0 &&
ctx->_ImageTransferState == 0 /* no color tables, scale/bias, etc */) {
_vbo_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
- if (ctx->DrawBuffer->Name != 0)
+ if (_mesa_is_user_fbo(ctx->DrawBuffer))
return;
/*