GLPROGRAMSTRING(3gl)GLPROGRAMSTRING(3gl)NAME
glProgramStringARB - Updates the program string for the current program
object.
C SPECIFICATION
void glProgramStringARB( GLenum target,
GLenum format,
GLsizei len,
const void *pointer)
PARAMETERS
target Symbolic name which specifies the program type. Valid val‐
ues
are
GL_VER‐
TEX_PRO‐
GRAM_ARB
and
GL_FRAG‐
MENT_PRO‐
GRAM_ARB.
format Specifies the format of program string accepted values are:
GL_PRO‐
GRAM_FOR‐
MAT_ASCII_ARB.
len Specifies length of program string.
pointer Pointer to character string containing the program source. array.
DESCRIPTION
glProgramStringARB updates the program string for current program
object for target. format describes the format of the program string,
which must currently be Gl_PROGRAM_FORMAT_ASCII_ARB. string is a
pointer to the array of bytes representing the program string being
loaded, which need not be null-terminated. The length of the array is
given by <len>. If string is null-terminated, len should not include
the terminator.
When a program string is loaded, it is interpreted according to syn‐
tactic and semantic rules corresponding to the program target specified
by target. If a program violates the syntactic or semantic restric‐
tions of the program target, glProgramStringARB generates the error
GL_INVALID_OPERATION.
Additionally, ProgramString will update the program error position
(GL_PROGRAM_ERROR_POSITION_ARB) and error string (GL_PRO‐
GRAM_ERROR_STRING_ARB). If a program fails to load, the value of the
program error position is set to the ubyte offset into the specified
program string indicating where the first program error was detected.
If the program fails to load because of a semantic restriction that is
not detected until the program is fully scanned, the error position is
set to the value of <len>. If a program loads successfully, the error
position is set to the value negative one. The implementation-depen‐
dent program error string contains one or more error or warning mes‐
sages. If a program loads successfully, the error string may either
contain warning messages or be empty.
ERRORS
GL_INVALID_OPERATION is generated program string is syntactically
incorrect or violates any semantic restriction of the execution envi‐
ronment of the specified program target.
GL_INVALID_OPERATION is generated glProgramStringARB is executed
between the execution of glBegin and the corresponding execution of
glEnd.
ASSOCIATED GETS
glGetProgramStringARB with argument target and pname GL_PRO‐
GRAM_STRING_ARB.
SEE ALSO
glBindProgramARB, glGetProgramStringARB
12 Mar 04 GLPROGRAMSTRING(3gl)