output-index ( program-instance output-name -- index ) (original) (raw)

output-index ( program-instance output-name -- index )

Vocabulary
gpu.shaders

Inputs

program-instance a program-instance
output-name a string

Outputs

index an integer

Word description
Returns the numeric index of the fragment shader output named output-name in program-instance.

Notes
Named fragment shader outputs require OpenGL 3.0 or later and GLSL 1.30 or later, or OpenGL 2.0 or later and GLSL 1.20 or earlier with the GL_EXT_gpu_shader4 extension.

Definition

USING: accessors kernel opengl.gl ;

IN: gpu.shaders

MEMO: output-index ( program-instance output-name -- index )
[ handle>> ] dip glGetFragDataLocation ;