Does anyone know the order / meaning of the 4 integers passed via GL_'TEXTURE_CROP_RECT_OES?

I’ve tried to find the information in the OES_draw_texture extension documentation, but they don’t specify what the four integers actually do. Do we have to evaluate them as left/right/top/bottom? Or left/top/width/height?

The documentation also does not specify if the current texture crop rectangle is queryable via glGetTexParameteriv and how the default values after texture creation are defined.

At last, how exactly are out of bound texture crop rectangles treated? Should an implementation use the current wrap mode or clamp the parameters to the texture baselevel size?

Best regards,
Nils Pipenbrinck

The crop rectangle is given as Ucr, Vcr, Wcr, Hcr. That is, “left”/“bottom”/width/height, although you can also have negative width and height to flip the image.

The crop rectangle is queriable, and the initial values are 0, 0, 0, 0 (this is in the spec). Texturing is performed using the current wrap and filter modes.

Thanks a lot!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.