fsleyes.gl.gl14.glmesh_funcs¶
This module provides functions which are used by the GLMesh
class to render Mesh overlays in an OpenGL 1.4 compatible
manner.
An ARBPShader is used to manage the glmesh vertex/fragment
programs.
-
fsleyes.gl.gl14.glmesh_funcs.compileShaders(self)¶ Loads the
glmeshvertex and fragment shader program source, and createsARBPShaderinstance(s).
-
fsleyes.gl.gl14.glmesh_funcs.updateShaderState(self, **kwargs)¶ Updates the state of the vertex/fragment shaders according to the current
MeshOptsconfiguration. This involves setting the parameter values used by the shaders.
-
fsleyes.gl.gl14.glmesh_funcs.preDraw(self)¶ Must be called before
draw(). Loads the appropriate shader program.
-
fsleyes.gl.gl14.glmesh_funcs.draw(self, glType, vertices, indices=None, normals=None, vdata=None)¶ Called for 3D meshes, and
MeshOpts.vertexDatais notNone. Loads and runs the shader program.Parameters: - glType – The OpenGL primitive type.
- vertices –
(n, 3)array containing the line vertices to draw. - indices – Indices into the
verticesarray. If not provided,glDrawArraysis used. - normals – Vertex normals.
- vdata –
(n, )array containing data for each vertex.