Revision as of 05:47, 15 August 2013 by AlfonsesCategoryBot (Talk | contribs) (Bot: Adding better formatting.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Core in version 4.5
Core since version 4.1
Core ARB extension ARB_separate_shader_objects

glActiveShaderProgram: set the active program object for a program pipeline object

Function Definition

 void glActiveShaderProgram(GLuint pipeline​, GLuint program​);
Specifies the program pipeline object to set the active program object for.
Specifies the program object to set as the active program pipeline object pipeline​.


glActiveShaderProgram sets the linked program named by program​ to be the active program for the program pipeline object pipeline​. The active program in the active program pipeline object is the target of calls to glUniform when no program has been made current through a call to glUseProgram.


GL_INVALID_OPERATION is generated if pipeline​ is not a name previously returned from a call to glGenProgramPipelines or if such a name has been deleted by a call to glDeleteProgramPipelines.

GL_INVALID_VALUE is generated if program​ is not a valid program object or shader object name.

GL_INVALID_OPERATION is generated if program​ is a shader object.

GL_INVALID_OPERATION is generated if program​ refers to a program object that has not been successfully linked.

See Also

glGenProgramPipelines, glBindProgramPipeline, glUseProgram, glUniform, glUniformSubroutines


Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999.