Handbook
Glossary
render ( render-set -- )
GPU-accelerated rendering
ยป
Rendering
Next:
render-set
Vocabulary
gpu
.
render
Inputs
render-set
a
render-set
Outputs
None
Word description
Submits a rendering job to the GPU. The values in the
render-set
tuple describe the job.
See also
render-set
Definition
USING:
accessors
combinators
gpu.framebuffers.private
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
IN:
gpu.render
:
render
( render-set -- )
{
[
vertex-array>>
program-instance>>
handle>>
glUseProgram
]
[
[
vertex-array>>
program-instance>>
]
[
uniforms>>
]
bi
bind-uniforms
]
[
framebuffer>>
[
GL_DRAW_FRAMEBUFFER
swap
framebuffer-handle
glBindFramebuffer
]
[
GL_DRAW_FRAMEBUFFER
0
glBindFramebuffer
GL_RASTERIZER_DISCARD
glEnable
]
if*
]
[
[
vertex-array>>
program-instance>>
]
[
framebuffer>>
]
[
output-attachments>>
]
tri
bind-output-attachments
]
[
vertex-array>>
bind-vertex-array
]
[
dup
transform-feedback-output>>
[
[
primitive-mode>>
gl-feedback-primitive-mode
glBeginTransformFeedback
]
[
bind-transform-feedback-output
]
bi*
]
[
drop
]
if*
]
[
[
primitive-mode>>
]
[
indexes>>
]
[
instances>>
]
tri
[
render-vertex-indexes-instanced
]
[
render-vertex-indexes
]
if*
]
[
transform-feedback-output>>
[
glEndTransformFeedback
]
when
]
[
framebuffer>>
[
GL_RASTERIZER_DISCARD
glDisable
]
unless
]
}
cleave
;
inline