#include "main/colormac.h"
#include "main/light.h"
#include "main/framebuffer.h"
+#include "main/fbobject.h"
#include "swrast/swrast.h"
#include "vbo/vbo.h"
rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~R200_CULL_FRONT_IS_CCW;
/* Winding is inverted when rendering to FBO */
- if (ctx->DrawBuffer && ctx->DrawBuffer->Name)
+ if (ctx->DrawBuffer && _mesa_is_user_fbo(ctx->DrawBuffer))
mode = (mode == GL_CW) ? GL_CCW : GL_CW;
switch ( mode ) {
GLfloat xoffset = 0;
GLfloat yoffset = dPriv ? (GLfloat) dPriv->h : 0;
const GLfloat *v = ctx->Viewport._WindowMap.m;
- const GLboolean render_to_fbo = (ctx->DrawBuffer ? (ctx->DrawBuffer->Name != 0) : 0);
+ const GLboolean render_to_fbo = (ctx->DrawBuffer ? _mesa_is_user_fbo(ctx->DrawBuffer) : 0);
const GLfloat depthScale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
GLfloat y_scale, y_bias;
#include "main/imports.h"
#include "main/context.h"
#include "main/enums.h"
+#include "main/fbobject.h"
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
#include "drivers/common/meta.h"
max_x = ctx->DrawBuffer->Width - 1;
max_y = ctx->DrawBuffer->Height - 1;
- if ( !ctx->DrawBuffer->Name ) {
+ if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
x1 = x;
y1 = ctx->DrawBuffer->Height - (y + h);
x2 = x + w - 1;
fprintf(stderr, "%s %s\n", __FUNCTION__,
_mesa_lookup_enum_by_nr( mode ));
- if (ctx->DrawBuffer->Name == 0) {
+ if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
const GLboolean was_front_buffer_rendering =
void radeonReadBuffer( struct gl_context *ctx, GLenum mode )
{
- if ((ctx->DrawBuffer != NULL) && (ctx->DrawBuffer->Name == 0)) {
+ if (ctx->DrawBuffer && _mesa_is_winsys_fbo(ctx->DrawBuffer)) {
struct radeon_context *const rmesa = RADEON_CONTEXT(ctx);
const GLboolean was_front_buffer_reading = rmesa->is_front_buffer_reading;
rmesa->is_front_buffer_reading = (mode == GL_FRONT_LEFT)
void (*old_viewport)(struct gl_context *ctx, GLint x, GLint y,
GLsizei w, GLsizei h);
- if (ctx->DrawBuffer->Name == 0) {
+ if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
if (radeon->is_front_buffer_rendering) {
ctx->Driver.Flush(ctx);
}
rcommonFlushCmdBuf(radeon, __FUNCTION__);
flush_front:
- if ((ctx->DrawBuffer->Name == 0) && radeon->front_buffer_dirty) {
+ if (_mesa_is_winsys_fbo(ctx->DrawBuffer) && radeon->front_buffer_dirty) {
__DRIscreen *const screen = radeon->radeonScreen->driScreen;
if (screen->dri2.loader && (screen->dri2.loader->base.version >= 2)
#include "main/light.h"
#include "main/context.h"
#include "main/framebuffer.h"
+#include "main/fbobject.h"
#include "main/simple_list.h"
#include "main/state.h"
rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~RADEON_CULL_FRONT_IS_CCW;
/* Winding is inverted when rendering to FBO */
- if (ctx->DrawBuffer && ctx->DrawBuffer->Name)
+ if (ctx->DrawBuffer && _mesa_is_user_fbo(ctx->DrawBuffer))
mode = (mode == GL_CW) ? GL_CCW : GL_CW;
switch ( mode ) {
GLfloat xoffset = 0.0;
GLfloat yoffset = dPriv ? (GLfloat) dPriv->h : 0;
const GLfloat *v = ctx->Viewport._WindowMap.m;
- const GLboolean render_to_fbo = (ctx->DrawBuffer ? (ctx->DrawBuffer->Name != 0) : 0);
+ const GLboolean render_to_fbo = (ctx->DrawBuffer ? _mesa_is_user_fbo(ctx->DrawBuffer) : 0);
const GLfloat depthScale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
GLfloat y_scale, y_bias;