10.02.2014 Views

spec - OpenGL

spec - OpenGL

spec - OpenGL

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

2.14. VERTEX SHADERS 126<br />

uniform block, a matrix stride of zero is returned.<br />

If pname is UNIFORM_IS_ROW_MAJOR, then an array identifying whether each<br />

of the uniforms <strong>spec</strong>ified by the corresponding array of uniformIndices is a rowmajor<br />

matrix or not is returned. A value of one indicates a row-major matrix, and<br />

a value of zero indicates a column-major matrix, a matrix in the default uniform<br />

block, or a non-matrix.<br />

If pname is UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX, then an array<br />

identifying the active atomic counter buffer index of each of the uniforms <strong>spec</strong>ified<br />

by the corresponding array of uniformIndices is returned. For uniforms other<br />

than atomic counters, the returned buffer index is -1. The returned indices can be<br />

passed to GetActiveAtomicCounterBufferiv to query properties of the associated<br />

buffer, and not necessarily the binding point <strong>spec</strong>ified in the uniform declaration.<br />

Loading Uniform Variables In The Default Uniform Block<br />

To load values into the uniform variables except for subroutine uniforms and<br />

atomic counters, of the default uniform block of the active program object, use<br />

the commands<br />

void Uniform{1234}{ifd}( int location, T value );<br />

void Uniform{1234}{ifd}v( int location, sizei count,<br />

const T value );<br />

void Uniform{1234}ui( int location, T value );<br />

void Uniform{1234}uiv( int location, sizei count, const<br />

T value );<br />

void UniformMatrix{234}{fd}v( int location, sizei count,<br />

boolean transpose, const float *value );<br />

void UniformMatrix{2x3,3x2,2x4,4x2,3x4,4x3}{fd}v(<br />

int location, sizei count, boolean transpose, const<br />

float *value );<br />

If a non-zero program object is bound by UseProgram, it is the active program<br />

object whose uniforms are updated by these commands. If no program object<br />

is bound using UseProgram, the active program object of the current program<br />

pipeline object set by ActiveShaderProgram is the active program object. If the<br />

current program pipeline object has no active program or there is no current program<br />

pipeline object, then there is no active program.<br />

The given values are loaded into the default uniform block uniform variable<br />

location identified by location.<br />

<strong>OpenGL</strong> 4.2 (Compatibility Profile) - August 22, 2011

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

Saved successfully!

Ooh no, something went wrong!