#include "pbo.h"
#include "state.h"
#include "dispatch.h"
-
-
-#if FEATURE_drawpix
+#include "glformats.h"
+#include "fbobject.h"
/*
* input), NVIDIA's implementation also just returns this error despite
* exposing GL_EXT_texture_integer, just return an error regardless.
*/
- if (_mesa_is_integer_format(format)) {
+ if (_mesa_is_enum_format_integer(format)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(integer format)");
goto end;
}
goto end;
}
- if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ if (_mesa_is_user_fbo(ctx->ReadBuffer) &&
+ ctx->ReadBuffer->Visual.samples > 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyPixels(multisample FBO)");
goto end;
}
ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
}
}
-#if _HAVE_FULL_GL
else if (ctx->RenderMode == GL_FEEDBACK) {
FLUSH_CURRENT(ctx, 0);
_mesa_feedback_token( ctx, (GLfloat) (GLint) GL_BITMAP_TOKEN );
ASSERT(ctx->RenderMode == GL_SELECT);
/* Do nothing. See OpenGL Spec, Appendix B, Corollary 6. */
}
-#endif
/* update raster position */
ctx->Current.RasterPos[0] += xmove;
SET_CopyPixels(disp, _mesa_CopyPixels);
SET_DrawPixels(disp, _mesa_DrawPixels);
}
-
-
-#endif /* FEATURE_drawpix */