fsleyes.gl.gl14.glvolume_funcs
¶
This module provides functions which are used by the GLVolume
class to render Image
overlays in an OpenGL 1.4 compatible manner.
An ARBPShader
is used to manage the glvolume
vertex/fragment
programs.
-
fsleyes.gl.gl14.glvolume_funcs.
init
(self)[source]¶ Calls
compileShaders()
andupdateShaderState()
.
-
fsleyes.gl.gl14.glvolume_funcs.
destroy
(self)[source]¶ Deletes handles to the vertex/fragment programs.
-
fsleyes.gl.gl14.glvolume_funcs.
compileShaders
(self)[source]¶ Creates a
ARBPShader
instance.
-
fsleyes.gl.gl14.glvolume_funcs.
updateShaderState
(self)[source]¶ Sets all variables required by the vertex and fragment programs.
-
fsleyes.gl.gl14.glvolume_funcs.
preDraw
(self, xform=None, bbox=None)[source]¶ Prepares to draw a slice from the given
GLVolume
instance.
-
fsleyes.gl.gl14.glvolume_funcs.
draw2D
(self, zpos, axes, xform=None, bbox=None)[source]¶ Draws a 2D slice of the image at the given Z location.
-
fsleyes.gl.gl14.glvolume_funcs.
draw3D
(self, xform=None, bbox=None)[source]¶ Draws the image in 3D on the canvas.
- Parameters
self – The
GLVolume
object which is managing the image to be drawn.xform – A 4*4 transformation matrix to be applied to the vertex data.
bbox – An optional bounding box.