bioformats  5.1.6
Public Member Functions | Private Attributes | List of all members
ome::qtwidgets::glsl::v110::GLLineShader2D Class Reference

2D line shader program. More...

#include <ome/qtwidgets/glsl/v110/GLLineShader2D.h>

+ Inheritance diagram for ome::qtwidgets::glsl::v110::GLLineShader2D:
+ Collaboration diagram for ome::qtwidgets::glsl::v110::GLLineShader2D:

Public Member Functions

 GLLineShader2D (QObject *parent=0)
 Constructor. More...
 
 ~GLLineShader2D ()
 Destructor.
 
void enableCoords ()
 Enable vertex coordinates. More...
 
void disableCoords ()
 Enable vertex coordinates. More...
 
void setCoords (const GLfloat *offset, int tupleSize, int stride=0)
 Set vertex coordinates from array. More...
 
void setCoords (QOpenGLBuffer &coords, const GLfloat *offset, int tupleSize, int stride=0)
 Set vertex coordinates from buffer object. More...
 
void enableColour ()
 Enable colour array.
 
void disableColour ()
 Disable colour array.
 
void setColour (const GLfloat *offset, int tupleSize, int stride=0)
 Set colours from array. More...
 
void setColour (QOpenGLBuffer &colours, const GLfloat *offset, int tupleSize, int stride=0)
 Set colours from buffer object. More...
 
void setModelViewProjection (const glm::mat4 &mvp)
 Set model view projection matrix. More...
 
void setZoom (float zoom)
 Set zoom level. More...
 

Private Attributes

QOpenGLShader * vshader
 The vertex shader. More...
 
QOpenGLShader * fshader
 The fragment shader. More...
 
int attr_coords
 Vertex coordinates attribute. More...
 
int attr_colour
 Vertex colour attribute.
 
int uniform_mvp
 Model view projection uniform. More...
 
int uniform_zoom
 Zoom uniform.
 

Detailed Description

2D line shader program.

Constructor & Destructor Documentation

ome::qtwidgets::glsl::v110::GLLineShader2D::GLLineShader2D ( QObject *  parent = 0)
explicit

Constructor.

Parameters
parentthe parent of this object.

References attr_colour, attr_coords, fshader, uniform_mvp, uniform_zoom, and vshader.

Member Function Documentation

void ome::qtwidgets::glsl::v110::GLLineShader2D::disableCoords ( )

Enable vertex coordinates.

References attr_coords.

Referenced by ome::qtwidgets::gl::v20::Grid2D::render().

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLLineShader2D::enableCoords ( )

Enable vertex coordinates.

References attr_coords.

Referenced by ome::qtwidgets::gl::v20::Grid2D::render().

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLLineShader2D::setColour ( const GLfloat *  offset,
int  tupleSize,
int  stride = 0 
)

Set colours from array.

Parameters
offsetdata offset if using a buffer object otherwise the colour values.
tupleSizethe tuple size of the data.
stridethe stride of the data.

References attr_colour.

Referenced by ome::qtwidgets::gl::v20::Grid2D::render(), and setColour().

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLLineShader2D::setColour ( QOpenGLBuffer &  colours,
const GLfloat *  offset,
int  tupleSize,
int  stride = 0 
)

Set colours from buffer object.

Parameters
coloursthe colour values; null if using a buffer object.
offsetthe offset into the colours buffer.
tupleSizethe tuple size of the data.
stridethe stride of the data.

References setColour().

void ome::qtwidgets::glsl::v110::GLLineShader2D::setCoords ( const GLfloat *  offset,
int  tupleSize,
int  stride = 0 
)

Set vertex coordinates from array.

Parameters
offsetdata offset if using a buffer object otherwise the coordinate values.
tupleSizethe tuple size of the data.
stridethe stride of the data.

References attr_coords.

Referenced by ome::qtwidgets::gl::v20::Grid2D::render(), and setCoords().

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLLineShader2D::setCoords ( QOpenGLBuffer &  coords,
const GLfloat *  offset,
int  tupleSize,
int  stride = 0 
)

Set vertex coordinates from buffer object.

Parameters
coordsthe coordinate values; null if using a buffer object.
offsetthe offset into the coords buffer.
tupleSizethe tuple size of the data.
stridethe stride of the data.

References setCoords().

void ome::qtwidgets::glsl::v110::GLLineShader2D::setModelViewProjection ( const glm::mat4 &  mvp)

Set model view projection matrix.

Parameters
mvpthe model view projection matrix.

References uniform_mvp.

Referenced by ome::qtwidgets::gl::v20::Grid2D::render().

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLLineShader2D::setZoom ( float  zoom)

Set zoom level.

Parameters
zoomthe zoom level.

References uniform_zoom.

Referenced by ome::qtwidgets::gl::v20::Grid2D::render().

+ Here is the caller graph for this function:

Member Data Documentation

int ome::qtwidgets::glsl::v110::GLLineShader2D::attr_coords
private

Vertex coordinates attribute.

Referenced by disableCoords(), enableCoords(), GLLineShader2D(), and setCoords().

QOpenGLShader* ome::qtwidgets::glsl::v110::GLLineShader2D::fshader
private

The fragment shader.

Referenced by GLLineShader2D().

int ome::qtwidgets::glsl::v110::GLLineShader2D::uniform_mvp
private

Model view projection uniform.

Referenced by GLLineShader2D(), and setModelViewProjection().

QOpenGLShader* ome::qtwidgets::glsl::v110::GLLineShader2D::vshader
private

The vertex shader.

Referenced by GLLineShader2D().


The documentation for this class was generated from the following files: