Difference between revisions of "GLAPI/glFramebufferTextureLayer"

From OpenGL.org
Jump to: navigation, search
(See Also)
m (Bot: Adding better formatting.)
Line 9: Line 9:
 
== Function Definition ==
 
== Function Definition ==
  
   void '''glFramebufferTextureLayer'''(GLenum ''target'', GLenum ''attachment'', GLuint ''texture'', GLint ''level'', GLint ''layer'');
+
   void '''glFramebufferTextureLayer'''(GLenum {{param|target}}, GLenum {{param|attachment}}, GLuint {{param|texture}}, GLint {{param|level}}, GLint {{param|layer}});
  
 
; target
 
; target
: Specifies the framebuffer target. ''target'' must be {{code|GL_DRAW_FRAMEBUFFER}}, {{code|GL_READ_FRAMEBUFFER}}, or {{code|GL_FRAMEBUFFER}}. {{code|GL_FRAMEBUFFER}} is equivalent to {{code|GL_DRAW_FRAMEBUFFER}}.
+
: Specifies the framebuffer target. {{param|target}} must be {{code|GL_DRAW_FRAMEBUFFER}}, {{code|GL_READ_FRAMEBUFFER}}, or {{code|GL_FRAMEBUFFER}}. {{code|GL_FRAMEBUFFER}} is equivalent to {{code|GL_DRAW_FRAMEBUFFER}}.
 
; attachment
 
; attachment
: Specifies the attachment point of the framebuffer. ''attachment'' must be {{code|GL_COLOR_ATTACHMENT''i''}}, {{code|GL_DEPTH_ATTACHMENT}}, {{code|GL_STENCIL_ATTACHMENT}} or {{code|GL_DEPTH_STENCIL_ATTACHMMENT}}.
+
: Specifies the attachment point of the framebuffer. {{param|attachment}} must be {{code|GL_COLOR_ATTACHMENT''i''}}, {{code|GL_DEPTH_ATTACHMENT}}, {{code|GL_STENCIL_ATTACHMENT}} or {{code|GL_DEPTH_STENCIL_ATTACHMMENT}}.
 
; texture
 
; texture
: Specifies the texture object to attach to the framebuffer attachment point named by ''attachment''.
+
: Specifies the texture object to attach to the framebuffer attachment point named by {{param|attachment}}.
 
; level
 
; level
: Specifies the mipmap level of ''texture'' to attach.
+
: Specifies the mipmap level of {{param|texture}} to attach.
 
; layer
 
; layer
: Specifies the layer of ''texture'' to attach.
+
: Specifies the layer of {{param|texture}} to attach.
  
 
== Description ==
 
== Description ==
  
'''glFramebufferTextureLayer''' operates like [[GLAPI/glFramebufferTexture|glFramebufferTexture]], except that only a single layer of the texture level, given by ''layer'', is attached to the attachment point. If ''texture'' is not zero, ''layer'' must be greater than or equal to zero. ''texture'' must either be zero or the name of an existing three-dimensional texture, one- or two-dimensional array texture, or multisample array texture.
+
'''glFramebufferTextureLayer''' operates like {{apifunc|glFramebufferTexture}}, except that only a single layer of the texture level, given by {{param|layer}}, is attached to the attachment point. If {{param|texture}} is not zero, {{param|layer}} must be greater than or equal to zero. {{param|texture}} must either be zero or the name of an existing three-dimensional texture, one- or two-dimensional array texture, or multisample array texture.
  
 
== Errors ==
 
== Errors ==
  
{{code|GL_INVALID_ENUM}} is generated if ''target'' is not one of the accepted tokens.
+
{{code|GL_INVALID_ENUM}} is generated if {{param|target}} is not one of the accepted tokens.
  
{{code|GL_INVALID_ENUM}} is generated if ''attachment'' is not one of the accepted tokens.
+
{{code|GL_INVALID_ENUM}} is generated if {{param|attachment}} is not one of the accepted tokens.
  
{{code|GL_INVALID_VALUE}} is generated if ''texture'' is not zero or the name of an existing texture object.
+
{{code|GL_INVALID_VALUE}} is generated if {{param|texture}} is not zero or the name of an existing texture object.
  
{{code|GL_INVALID_VALUE}} is generated if ''texture'' is not zero and ''layer'' is negative.
+
{{code|GL_INVALID_VALUE}} is generated if {{param|texture}} is not zero and {{param|layer}} is negative.
  
{{code|GL_INVALID_OPERATION}} is generated if zero is bound to ''target''.
+
{{code|GL_INVALID_OPERATION}} is generated if zero is bound to {{param|target}}.
  
{{code|GL_INVALID_OPERATION}} is generated if ''texture'' is not zero or the name of an existing cube map texture.
+
{{code|GL_INVALID_OPERATION}} is generated if {{param|texture}} is not zero or the name of an existing cube map texture.
  
 
== See Also ==
 
== See Also ==
  
[[GLAPI/glGenFramebuffers|glGenFramebuffers]], [[GLAPI/glBindFramebuffer|glBindFramebuffer]], {{apifunc|glFramebufferRenderbuffer}}, [[GLAPI/glFramebufferTexture|glFramebufferTexture]]
+
{{apifunc|glGenFramebuffers}}, {{apifunc|glBindFramebuffer}}, {{apifunc|glFramebufferRenderbuffer}}, {{apifunc|glFramebufferTexture}}
  
 
== Copyright ==
 
== Copyright ==

Revision as of 21:18, 28 April 2012

glFramebufferTextureLayer
Core in version 4.5
Core since version 3.2
ARB extension ARB_geometry_shader4


glFramebufferTextureLayer: attach a single layer of a texture to a framebuffer

Function Definition

 void glFramebufferTextureLayer(GLenum target​, GLenum attachment​, GLuint texture​, GLint level​, GLint layer​);
target
Specifies the framebuffer target. target​ must be GL_DRAW_FRAMEBUFFER​, GL_READ_FRAMEBUFFER​, or GL_FRAMEBUFFER​. GL_FRAMEBUFFER​ is equivalent to GL_DRAW_FRAMEBUFFER​.
attachment
Specifies the attachment point of the framebuffer. attachment​ must be GL_COLOR_ATTACHMENTi, GL_DEPTH_ATTACHMENT​, GL_STENCIL_ATTACHMENT​ or GL_DEPTH_STENCIL_ATTACHMMENT​.
texture
Specifies the texture object to attach to the framebuffer attachment point named by attachment​.
level
Specifies the mipmap level of texture​ to attach.
layer
Specifies the layer of texture​ to attach.

Description

glFramebufferTextureLayer operates like glFramebufferTexture, except that only a single layer of the texture level, given by layer​, is attached to the attachment point. If texture​ is not zero, layer​ must be greater than or equal to zero. texture​ must either be zero or the name of an existing three-dimensional texture, one- or two-dimensional array texture, or multisample array texture.

Errors

GL_INVALID_ENUM​ is generated if target​ is not one of the accepted tokens.

GL_INVALID_ENUM​ is generated if attachment​ is not one of the accepted tokens.

GL_INVALID_VALUE​ is generated if texture​ is not zero or the name of an existing texture object.

GL_INVALID_VALUE​ is generated if texture​ is not zero and layer​ is negative.

GL_INVALID_OPERATION​ is generated if zero is bound to target​.

GL_INVALID_OPERATION​ is generated if texture​ is not zero or the name of an existing cube map texture.

See Also

glGenFramebuffers, glBindFramebuffer, glFramebufferRenderbuffer, glFramebufferTexture

Copyright

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. http://opencontent.org/openpub/.