window-vertex-format - Factor Documentation

window-vertex-format


Vocabulary
gpu .util

Class description
A vertex format for screen coordinates.

Definition
IN: gpu.util

SINGLETON: window-vertex-format


Methods
USING: alien.c-types alien.data alien.strings byte-arrays
combinators gpu.shaders gpu.shaders.private gpu.util
io.encodings.ascii kernel opengl.gl ;

M: window-vertex-format (verify-feedback-format)
drop [
[
0 7 dup [ f 0 int <ref> 0 int <ref> ] dip
<byte-array> [ glGetTransformFeedbackVarying ] 3keep
ascii alien>string
T{ vertex-attribute { name "vertex" } { dim 2 } }
assert-feedback-attribute
]
] cleave ;


USING: combinators gpu.buffers gpu.shaders.private gpu.util
kernel ;

M: window-vertex-format bind-vertex-format
drop vertex-buffer [
{
[
"vertex" 2 5126 0 8 0
(bind-float-vertex-attribute)
]
} 2cleave
] with-buffer-ptr ;


USING: alien.syntax gpu.shaders.private gpu.util kernel
opengl.gl specialized-arrays.instances.alien.c-types.void* ;

M: window-vertex-format link-feedback-format
drop 1
void*-array{ ALIEN: 600002334000 } GL_INTERLEAVED_ATTRIBS
glTransformFeedbackVaryings ;


USING: gpu.shaders gpu.util kernel ;

M: window-vertex-format vertex-format-size drop 8 ;

AltStyle によって変換されたページ (->オリジナル) /