Handbook
Glossary
clear-framebuffer-attachment ( framebuffer: any-framebuffer attachment-ref: attachment-ref value -- )
GPU-accelerated rendering
ยป
Framebuffer objects
Prev:
clear-framebuffer ( framebuffer alist -- )
Next:
allocate-renderbuffer ( renderbuffer: renderbuffer dim -- )
Vocabulary
gpu
.
framebuffers
Inputs
framebuffer
an
any-framebuffer
attachment-ref
an
attachment-ref
value
an
object
Outputs
None
Word description
Clears the active viewport area of the given attachment to
framebuffer
to
value
.
Notes
User-created framebuffer objects require OpenGL 3.0 or one of the
GL_ARB_framebuffer_object
or
GL_EXT_framebuffer_object
extensions.
See also
clear-framebuffer
Definition
USING:
gpu.framebuffers.private
kernel
math
opengl.gl
typed
variants
;
IN:
gpu.framebuffers
TYPED::
clear-framebuffer-attachment
( framebuffer: any-framebuffer attachment-ref: attachment-ref value -- )
GL_DRAW_FRAMEBUFFER
framebuffer
framebuffer-handle
glBindFramebuffer
attachment-ref
{
{
system-attachment
[|
side face |
float-type
side face
gl-system-attachment
value
(clear-color-attachment)
]
}
{
color-attachment
[|
i |
framebuffer i
(color-attachment-type)
GL_COLOR_ATTACHMENT0
i
+
value
(clear-color-attachment)
]
}
{
default-attachment
[
framebuffer
[
(default-attachment-type)
]
[
(default-gl-attachment)
]
bi
value
(clear-color-attachment)
]
}
{
depth-attachment
[
value
glClearDepth
GL_DEPTH_BUFFER_BIT
glClear
]
}
{
stencil-attachment
[
value
glClearStencil
GL_STENCIL_BUFFER_BIT
glClear
]
}
}
match
;