21.06.2014 Views

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.10. TEXTURING 326<br />

read the buffer object’s data store. The buffer object bound to TEXTURE_BUFFER<br />

has no effect on rendering. A buffer object is bound to TEXTURE_BUFFER by calling<br />

BindBuffer with target set to TEXTURE_BUFFER, as described in section 2.9.<br />

3.10.8 Texture Parameters<br />

Various parameters control how the texel array is treated when specified or<br />

changed, and when applied to a fragment. Each parameter is set by calling<br />

void TexParameter{if}( enum target, enum pname, T param );<br />

void TexParameter{if}v( enum target, enum pname, const<br />

T *params );<br />

void TexParameterI{i ui}v( enum target, enum pname, const<br />

T *params );<br />

target is the target, either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_-<br />

1D_ARRAY, TEXTURE_2D_ARRAY. TEXTURE_RECTANGLE, TEXTURE_CUBE_MAP,<br />

or TEXTURE_CUBE_MAP_ARRAY, params is a symbolic constant indicating the parameter<br />

to be set; the possible constants and corresponding parameters are summarized<br />

in table 3.22. In the first form of the command, param is a value to which<br />

to set a single-valued parameter; in the remaining forms, params is an array of<br />

parameters whose type depends on the parameter being set.<br />

Data conversions are performed as specified in section 2.3.1. However, if<br />

the value for TEXTURE_PRIORITY is specified with TexParameteri or TexParameteriv,<br />

it is treated as a signed normalized fixed-point value and converted to<br />

floating-point using equation 2.2, followed by clamping the value to lie in [0, 1].<br />

In addition, if the values for TEXTURE_BORDER_COLOR are specified with Tex-<br />

ParameterIiv or TexParameterIuiv, the values are unmodified and stored with<br />

an internal data type of integer. If specified with TexParameteriv, they are converted<br />

to floating-point using equation 2.2. Otherwise the values are unmodified<br />

and stored as floating-point.<br />

If pname is TEXTURE_SWIZZLE_RGBA, params is an array of four<br />

enums which respectively set the TEXTURE_SWIZZLE_R, TEXTURE_SWIZZLE_G,<br />

TEXTURE_SWIZZLE_B, and TEXTURE_SWIZZLE_A parameters simultaneously.<br />

An INVALID_ENUM error is generated if the type of the parameter specified by<br />

pname is enum, and the value(s) specified by param or params are not among the<br />

legal values shown in table 3.22.<br />

An INVALID_ENUM error is generated if TexParameter{if} is called for a<br />

non-scalar parameter (TEXTURE_BORDER_COLOR or TEXTURE_SWIZZLE_RGBA,<br />

or if TexParameter*v is called for a scalar parameter (all other parameters in table<br />

3.22).<br />

<strong>OpenGL</strong> <strong>4.2</strong> (<strong>Compatibility</strong> <strong>Profile</strong>) - <strong>April</strong> <strong>27</strong>, <strong>2012</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!