fsleyes.gl.gl21.glrgbvector_funcs

This module provides functions which are used by the GLRGBVector class to render Image overlays as RGB vector images in an OpenGL 2.1 compatible manner.

This module uses functions in the gl21.glvector_funcs module, which contains logic used for rendering both GLRGBVector and GLLineVector instances.

Rendering of a GLRGBVector is very similar to that of a GLVolume, with the exception that a different fragment shader (glvector) may be used. Therefore, the preDraw, draw2D, draw3D, drawAll and postDraw functions defined in the gl21.glvolume_funcs are re-used by this module.

fsleyes.gl.gl21.glrgbvector_funcs.init(self)[source]

Calls the compileShaders() and updateShaderState() functions.

fsleyes.gl.gl21.glrgbvector_funcs.destroy(self)[source]

Destroys the vertex buffer and vertex/fragment shaders created in init().

fsleyes.gl.gl21.glrgbvector_funcs.compileShaders(self)[source]

Calls gl21.glvector_funcs.compileShaders().

fsleyes.gl.gl21.glrgbvector_funcs.updateShaderState(self)[source]

Updates all shader program variables. Most of the shader configuration is performed by the :func:.gl21.glvector_funcs.updateShaderState` function.