fsleyes.gl.shaders¶
The shaders package contains classes and functions for finding,
parsing, compiling, and managing OpenGL shader programs. Two types of shader
program are supported:
GLSL 1.20 vertex and fragment shaders.
ARB_vertex_programandARB_fragment_programshader programs.
The glsl and arbp packages respectively define the
GLSLShader and ARBPShader classes, which may be
used to manage shader programs of the corresponding type.
Some package-level functions are defined here, for finding and loading shader source code:
Returns the directory in which the
ARBandglslshader program source files can be found.Returns the shader program file suffix to use.
Returns the vertex shader source for the given GL type (e.g.
Returns the fragment shader source for the given GL type.
-
fsleyes.gl.shaders.getShaderDir()[source]¶ Returns the directory in which the
ARBandglslshader program source files can be found. A different directory will be returned depending on which OpenGL version is in use.
-
fsleyes.gl.shaders.getShaderSuffix()[source]¶ Returns the shader program file suffix to use. A different suffix will be returned depending on which OpenGL version is in use.
-
fsleyes.gl.shaders.getVertexShader(prefix)[source]¶ Returns the vertex shader source for the given GL type (e.g. ‘glvolume’).
-
fsleyes.gl.shaders.getFragmentShader(prefix)[source]¶ Returns the fragment shader source for the given GL type.
-
fsleyes.gl.shaders._getShader(prefix, shaderType)[source]¶ Returns the shader source for the given GL type and the given shader type (‘vert’ or ‘frag’).