Handbook
Glossary
<simple-gl-program> ( vertex-shader-source fragment-shader-source -- program )
Vocabulary
opengl
.
shaders
Inputs
vertex-shader-source
A string containing GLSL vertex shader source
fragment-shader-source
A string containing GLSL fragment shader source
Outputs
program
a new
gl-program
Word description
Wrapper for
<gl-program>
for the simple case of compiling a single vertex shader and fragment shader and linking them into a GLSL program. Throws an exception if compiling or linking fails.
Definition
USING:
arrays
kernel
;
IN:
opengl.shaders
:
<simple-gl-program>
( vertex-shader-source fragment-shader-source -- program )
[
<vertex-shader>
check-gl-shader
]
[
<fragment-shader>
check-gl-shader
]
bi*
2array
<gl-program>
check-gl-program
;