Lines Matching full:program
54 program object to specify a GLSL shader for each domain.
61 HLSL9, Cg, the prior OpenGL assembly program extensions, and game
69 domain model for GLSL so different GLSL program objects can be bound
72 This extension redefines the operation of glUseProgram(GLenum program)
75 glUseShaderProgramEXT(GL_VERTEX_SHADER, program);
76 glUseShaderProgramEXT(GL_GEOMETRY_SHADER_EXT, program);
77 glUseShaderProgramEXT(GL_FRAGMENT_SHADER, program);
78 glActiveProgramEXT(program);
84 the program that glUniform* commands will update.
102 void UseShaderProgramEXT(enum type, uint program);
104 void ActiveProgramEXT(uint program);
116 -- Section 2.20.2 "Program Objects" (page 91)
124 creates a stand-alone program from a source code string for a single
133 const uint program = CreateProgram();
134 if (program) {
138 AttachShader(program, shader);
139 LinkProgram(program);
140 DetachShader(program, shader);
144 if (active-user-defined-varyings-in-linked-program) {
146 set-program-link-status-false
149 append-shader-info-log-to-program-info-log
152 return program;
157 Notice the program may not actually link if the linked program would
164 the info log of the shader object is copied to the program so the
173 void UseShaderProgramEXT(enum type, uint program);
176 FRAGMENT_SHADER program shader types, and program is the program
177 object program containing valid executable code, i.e. has been linked
178 successfully. Based on the type, the program becomes the current
179 vertex, fragment, or geometry shader program respectively and the
181 rendering state. If UseShaderProgramEXT is called with program set
184 fixed-function path will be used instead. If program has not been
190 void ActiveProgramEXT(uint program);
192 sets the linked program named by program to be the active program
194 2.20.3). If program has not been successfully linked, the error
195 INVALID_OPERATION is generated and active program is not modified.
199 void UseProgram(uint program);
203 UseShaderProgramEXT(VERTEX_SHADER, program);
204 UseShaderProgramEXT(GEOMETRY_SHADER_EXT, program);
205 UseShaderProgramEXT(FRAGMENT_SHADER, program);
206 ActiveProgramEXT(program);
208 If a program object contains multiple shader types but is not bound
209 for all its supported shader types, the program object's shader
216 "To load values into the uniform variables of the active program
221 "* if there is no active program in use."
227 "If a successfully linked program object that contains a vertex
240 shader program, current geometry shader program, current fragment
241 shader program, and active program respectively."
249 "When the current fragment shader program object currently includes
251 used to process fragments. If the fragment shader program object
252 has no fragment shader, or no fragment shader program object is
261 shader program object and the preceding programmable shading stage,
262 either the geometry shader stage if the geometry shader program
264 if the vertex shader program object contains a vertex shader, are
265 the same program object. So user-defined varying values are only
267 input shader are the same program object.
270 program with a different preceding geometry shader program or
271 vertex shader program when the current geometry shader program is
273 as gl_TexCoord[0]. If the current fragment shader program object
275 geometry shader program is not the same program object or, in the
276 case the geometry shader program is zero, the preceding current
277 vertex shader program object is not the same program object, then
301 Add "CreateShaderProgramEXT" to the "Program and shader objects"
321 in program objects as described in section 2.15.2. When a geometry
322 shader program object currently in use includes a geometry shader,
324 primitives. If the geometry shader program object has no geometry
325 shader, or no program object is in use, this new primitive processing
328 A program object that includes a geometry shader without a vertex
336 "If a successfully linked program object that contains a geometry shader is
337 made current as the geometry shader program object by calling
345 shader program object and the preceding vertex shader program object
346 are the same program object. So user-defined varying values are only
348 input shader are the same program object.
351 program with a different preceding vertex shader program, applications
353 If the current geometry shader program object uses user-defined
355 program object is not the same program object, then the values of
373 UseShaderProgramEXT generates INVALID_OPERATION if the program
379 ActiveProgramEXT generates INVALID_OPERATION if the program parameter
382 LinkProgram NO LONGER generates an INVALID_OPERATION if the program
396 Remove CURRENT_PROGRAM from table 6.30 (Program Object State) and
401 ACTIVE_PROGRAM_EXT Z+ GetIntegerv 0 The program object 2.20.2 -
405 shader program object
407 shader program object
409 shader program object
475 3. Do different program objects currently used by different shader
478 RESOLVED: No, different program objects have their own separate
480 unique program object.
482 4. How do the glUniform* commands determine what program object
485 RESOLVED: This extension introduces the active program specified
490 This active program is simply a selector and doesn't actually
493 The active program can be queried with glGetIntegerv with
501 selector but specify the program object with which to update
504 5. Do the glGetUniform* queries depend on the active program state
507 RESOLVED: No, the glGetUniform* queries take the program
511 6a. Should the fragment shader program object be allowed to changed
523 Perhaps it is desirable to allow different shader program objects
528 6b. Should the active program be allowed to changed within transform
533 The active program simply allows uniforms to be changed but
538 7. What if a program object contains shaders from two domains, say
539 both a vertex shader and a geometry shader, and the program object
540 is just used as the current fragment shader program object?
542 RESOLVED: The vertex shader within the program object is
545 8. What if a program object contains both a vertex and fragment
546 shader and this program object is bound to both the current
547 vertex shader and fragment shader program object but there is
548 also a different geometry shader program object bound?
554 intervening different geometry shader program object is currently
557 shader program object can read those built-in varying values
560 from the different geometry shader program object.
569 program that programs a single shader type?
573 The existing GLSL API for creating a GLSL program involves a lot
595 the preceding shader doesn't belong to the same program object.
649 in a single program.
656 sequence. This means if you call glLinkProgram on a program
661 to the program and then relink would work.
673 is used to easily create a vertex shader program, but the
709 Now creating and using a linked program from this shader where
718 const uint program = glCreateProgram();
719 if (program) {
723 glAttachShader(program, shader);
726 glBindAttribLocation(program, 5, "attribA");
727 glBindAttribLocation(program, 7, "attribB");
729 glLinkProgram(program);
730 glDetachShader(program, shader);
732 // Show this program can actually be used as a vertex shader
733 glUseShaderProgramEXT(GL_VERTEX_SHADER, program);
737 return program;
743 be removed to allow this program to be re-linked after different
747 variables from a fragment shader program created by
752 program with the standard GLSL creation process where you attach
779 Now creating and using a linked program from this shader where
788 const uint program = glCreateProgram();
789 if (program) {
793 glAttachShader(program, shader);
796 glBindFragDataLocation(program, 0, "bufferA");
797 glBindFragDataLocation(program, 1, "bufferB");
799 glLinkProgram(program);
800 glDetachShader(program, shader);
802 // Show this program can actually be used as a fragment shader
803 glUseShaderProgramEXT(GL_FRAGMENT_SHADER, program);
807 return program;
813 removed to allow this program to be re-linked after different
816 17. Can you output varyings from a seperate shader program created
822 program. glCreateShaderProgramEXT detaches and deletes the shader
823 object use to create the program so a glLinkProgram will fail.
825 You can still create a vertex or geometry shader program
840 For GLSL today, this situation today requires 4 program objects,
849 Each GLSL program object has its own (combined) set of GLuint
851 shaders objects linked into the particular program object.
853 The locations for a given program object are arbitrary and
854 the location values of two distinct program objects have no
861 the values of these variables are mirroed over all four program
864 What's worse is despite all the program objects being loaded
867 one of these program objects to another is going to result in
870 of program objects (when the uniform fragment shader variables
875 It's only the current fragment shader program that is changing