framebuffer-attachment-at ( framebuffer: framebuffer attachment-ref: attachment-ref -- attachment: framebuffer-attachment ) (original) (raw)
Vocabulary
gpu.framebuffers
Inputs
framebuffer | a framebuffer |
---|---|
attachment-ref | an attachment-ref |
Outputs
attachment | a framebuffer-attachment |
---|
Word description
Returns the texture-attachment or renderbuffer referenced by attachment-ref in framebuffer.
Notes
User-created framebuffer objects require OpenGL 3.0 or one of the GL_ARB_framebuffer_object or GL_EXT_framebuffer_object extensions.
Definition
USING: accessors kernel sequences typed variants ;
TYPED: framebuffer-attachment-at
( framebuffer: framebuffer attachment-ref: attachment-ref -- attachment: framebuffer-attachment )
{
{ default-attachment [ color-attachments>> first ] }
{ color-attachment [ swap color-attachments>> nth ] }
{ depth-attachment [ depth-attachment>> ] }
{ stencil-attachment [ stencil-attachment>> ] }
} match ;