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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.1. QUERYING GL STATE 501<br />

tion attempt on a program pipeline object, called the info log, can be obtained with<br />

the commands<br />

void GetShaderInfoLog( uint shader, sizei bufSize,<br />

sizei *length, char *infoLog );<br />

void GetProgramInfoLog( uint program, sizei bufSize,<br />

sizei *length, char *infoLog );<br />

void GetProgramPipelineInfoLog( uint pipeline,<br />

sizei bufSize, sizei *length, char *infoLog );<br />

These commands return an info log string for the corresponding type of object<br />

in infoLog. This string will be null-terminated. The actual number of characters<br />

written into infoLog, excluding the null terminator, is returned in length. If length<br />

is NULL, then no length is returned. The maximum number of characters that may<br />

be written into infoLog, including the null terminator, is specified by bufSize. The<br />

number of characters in the info log for a shader object, program object, or program<br />

pipeline object can be queried respectively with GetShaderiv, GetProgramiv, or<br />

GetProgramPipelineiv with pname INFO_LOG_LENGTH.<br />

If shader is a shader object, GetShaderInfoLog will return either an empty<br />

string or information about the last compilation attempt for that object. If program<br />

is a program object, GetProgramInfoLog will return either an empty string or information<br />

about the last link attempt or last validation attempt for that object. If<br />

pipeline is a program pipeline object, GetProgramPipelineInfoLog will return either<br />

an empty string or information about the last validation attempt for that object.<br />

The info log is typically only useful during application development and an<br />

application should not expect different GL implementations to produce identical<br />

info logs.<br />

The command<br />

void GetShaderSource( uint shader, sizei bufSize,<br />

sizei *length, char *source );<br />

returns in source the string making up the source code for the shader object shader.<br />

The string source will be null-terminated. The actual number of characters written<br />

into source, excluding the null terminator, is returned in length. If length is NULL,<br />

no length is returned. The maximum number of characters that may be written into<br />

source, including the null terminator, is specified by bufSize. The string source is<br />

a concatenation of the strings passed to the GL using ShaderSource. The length<br />

of this concatenation is given by SHADER_SOURCE_LENGTH, which can be queried<br />

with GetShaderiv.<br />

The command<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!