GLenum DepthMode; /**< GL_ARB_depth_texture */
GLint _MaxLevel; /**< actual max mipmap level (q in the spec) */
GLfloat _MaxLambda; /**< = _MaxLevel - BaseLevel (q - b in spec) */
+ GLint CropRect[4]; /**< GL_OES_draw_texture */
GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */
GLboolean _Complete; /**< Is texture object complete? */
/** GL_EXT_paletted_texture */
struct gl_color_table Palette;
-
/**
* \name For device driver.
* Note: instead of attaching driver data to this pointer, it's preferable
}
}
break;
+#ifdef FEATURE_OES_draw_texture
+ case GL_TEXTURE_CROP_RECT_OES:
+ texObj->CropRect[0] = (GLint) params[0];
+ texObj->CropRect[1] = (GLint) params[1];
+ texObj->CropRect[2] = (GLint) params[2];
+ texObj->CropRect[3] = (GLint) params[3];
+ break;
+#endif
default:
_mesa_error(ctx, GL_INVALID_ENUM,
fparam[2] = INT_TO_FLOAT(params[2]);
fparam[3] = INT_TO_FLOAT(params[3]);
}
+ else if (pname == GL_TEXTURE_CROP_RECT_OES) {
+ fparam[0] = (GLfloat) params[0];
+ fparam[1] = (GLfloat) params[1];
+ fparam[2] = (GLfloat) params[2];
+ fparam[3] = (GLfloat) params[3];
+ }
else {
if (pname == GL_TEXTURE_PRIORITY)
fparam[0] = INT_TO_FLOAT(params[0]);
else
error = 1;
break;
+#ifdef FEATURE_OES_draw_texture
+ case GL_TEXTURE_CROP_RECT_OES:
+ params[0] = obj->CropRect[0];
+ params[0] = obj->CropRect[1];
+ params[0] = obj->CropRect[2];
+ params[0] = obj->CropRect[3];
+ break;
+#endif
default:
error = 1;
break;
return;
}
break;
+#ifdef FEATURE_OES_draw_texture
+ case GL_TEXTURE_CROP_RECT_OES:
+ params[0] = obj->CropRect[0];
+ params[0] = obj->CropRect[1];
+ params[0] = obj->CropRect[2];
+ params[0] = obj->CropRect[3];
+ break;
+#endif
default:
; /* silence warnings */
}