GLAPI/glIsShader: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m Renaming category: 'API Reference 4' to 'Core API Reference'.
m Bot: Adding better formatting.
 
(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
== Function Definition ==
== Function Definition ==


   GLboolean '''glIsShader'''(GLuint ''shader'');
   GLboolean '''glIsShader'''(GLuint {{param|shader}});


; shader
; shader
Line 15: Line 15:
== Description ==
== Description ==


'''glIsShader''' returns {{code|GL_TRUE}} if ''shader'' is the name of a shader object previously created with [[GLAPI/glCreateShader|glCreateShader]] and not yet deleted with [[GLAPI/glDeleteShader|glDeleteShader]]. If ''shader'' is zero or a non-zero value that is not the name of a shader object, or if an error occurs, '''glIsShader''' returns {{code|GL_FALSE}}.
'''glIsShader''' returns {{enum|GL_TRUE}} if {{param|shader}} is the name of a shader object previously created with {{apifunc|glCreateShader}} and not yet deleted with {{apifunc|glDeleteShader}}. If {{param|shader}} is zero or a non-zero value that is not the name of a shader object, or if an error occurs, '''glIsShader''' returns {{enum|GL_FALSE}}.


== Notes ==
== Notes ==


No error is generated if ''shader'' is not a valid shader object name.
No error is generated if {{param|shader}} is not a valid shader object name.


A shader object marked for deletion with [[GLAPI/glDeleteShader|glDeleteShader]] but still attached to a program object is still considered a shader object and '''glIsShader''' will return {{code|GL_TRUE}}.
A shader object marked for deletion with {{apifunc|glDeleteShader}} but still attached to a program object is still considered a shader object and '''glIsShader''' will return {{enum|GL_TRUE}}.


== Associated Gets ==
== Associated Gets ==


[[GLAPI/glGetAttachedShaders|glGetAttachedShaders]] with a valid program object
{{apifunc|glGetAttachedShaders}} with a valid program object


[[GLAPI/glGetShader|glGetShader]] with arguments ''shader'' and a parameter to be queried
{{apifunc|glGetShader}} with arguments {{param|shader}} and a parameter to be queried


[[GLAPI/glGetShaderInfoLog|glGetShaderInfoLog]] with argument ''object''
{{apifunc|glGetShaderInfoLog}} with argument {{param|object}}


[[GLAPI/glGetShaderSource|glGetShaderSource]] with argument ''object''
{{apifunc|glGetShaderSource}} with argument {{param|object}}


== See Also ==
== See Also ==


[[GLAPI/glAttachShader|glAttachShader]], [[GLAPI/glCompileShader|glCompileShader]], [[GLAPI/glCreateShader|glCreateShader]], [[GLAPI/glDeleteShader|glDeleteShader]], [[GLAPI/glDetachShader|glDetachShader]], [[GLAPI/glLinkProgram|glLinkProgram]], [[GLAPI/glShaderSource|glShaderSource]]
{{apifunc|glCreateShader}}, {{apifunc|glDeleteShader}}


== Copyright ==
== Copyright ==
Line 41: Line 41:
Copyright © 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. [http://opencontent.org/openpub/ http://opencontent.org/openpub/].
Copyright © 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. [http://opencontent.org/openpub/ http://opencontent.org/openpub/].


[[Category:GL 4 API Shader Program Creation|IsShader]]
[[Category:Core API Reference|IsShader]]
[[Category:Core API Reference|IsShader]]
[[Category:Core API Ref Shader Program Creation|IsShader]]

Latest revision as of 19:41, 27 September 2012

glIsShader
Core in version 4.6
Core since version 2.0

glIsShader: Determines if a name corresponds to a shader object

Function Definition

 GLboolean glIsShader(GLuint shader​);
shader
Specifies a potential shader object.

Description

glIsShader returns GL_TRUE if shader​ is the name of a shader object previously created with glCreateShader and not yet deleted with glDeleteShader. If shader​ is zero or a non-zero value that is not the name of a shader object, or if an error occurs, glIsShader returns GL_FALSE.

Notes

No error is generated if shader​ is not a valid shader object name.

A shader object marked for deletion with glDeleteShader but still attached to a program object is still considered a shader object and glIsShader will return GL_TRUE.

Associated Gets

glGetAttachedShaders with a valid program object

glGetShader with arguments shader​ and a parameter to be queried

glGetShaderInfoLog with argument object​

glGetShaderSource with argument object​

See Also

glCreateShader, glDeleteShader

Copyright

Copyright © 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.