GET_CURRENT_CONTEXT(ctx);
obj = ctx->TransformFeedback.CurrentObject;
+
+ if (ctx->Shader.CurrentVertexProgram == NULL) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBeginTransformFeedback(no program active)");
+ return;
+ }
+
info = &ctx->Shader.CurrentVertexProgram->LinkedTransformFeedback;
+ if (info->NumOutputs == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBeginTransformFeedback(no varyings to record)");
+ return;
+ }
+
switch (mode) {
case GL_POINTS:
case GL_LINES:
return;
}
+ if (offset & 0x3) {
+ /* must be multiple of four */
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glBindBufferOffsetEXT(offset=%d)", (int) offset);
+ return;
+ }
+
bufObj = _mesa_lookup_bufferobj(ctx, buffer);
if (!bufObj) {
_mesa_error(ctx, GL_INVALID_OPERATION,