首页 > comp > gb.opengl.glsl > gl > detachshader 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh eo
前一个  下一个  编辑  重命名  撤销  搜索  管理  
文档  
警告! 该页面未翻译。  参见英文版 
Gl.DetachShader (gb.opengl.glsl)
Static Sub DetachShader ( Program As Integer, Shader As Integer )

Detaches a shader object from a program object to which it is attached.

Parameters

program

Specifies the program object from which to detach the shader object.

shader

Specifies the shader object to be detached.

Description

Gl.DetachShader detaches the shader object specified by shader from the program object specified by program. This command can be used to undo the effect of the command Gl.AttachShader.

If shader has already been flagged for deletion by a call to Gl.DeleteShader and it is not attached to any other program object, it will be deleted after it has been detached.

Errors

Gl.INVALID_VALUE is generated if either program or shader is a value that was not generated by OpenGL.

Gl.INVALID_OPERATION is generated if program is not a program object.

Gl.INVALID_OPERATION is generated if shader is not a shader object.

Gl.INVALID_OPERATION is generated if shader is not attached to program.

Associated Gets

Gl.GetAttachedShaders with the handle of a valid program object

Gl.GetShader with arguments shader and Gl.DELETE_STATUS

Gl.IsProgram

Gl.IsShader

参见

Gl.AttachShader

See original documentation on OpenGL website