bioformats
5.1.6
|
2D line shader program. More...
#include <ome/qtwidgets/glsl/v110/GLLineShader2D.h>
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. | |
2D line shader program.
|
explicit |
Constructor.
parent | the parent of this object. |
References attr_colour, attr_coords, fshader, uniform_mvp, uniform_zoom, and vshader.
void ome::qtwidgets::glsl::v110::GLLineShader2D::disableCoords | ( | ) |
Enable vertex coordinates.
References attr_coords.
Referenced by ome::qtwidgets::gl::v20::Grid2D::render().
void ome::qtwidgets::glsl::v110::GLLineShader2D::enableCoords | ( | ) |
Enable vertex coordinates.
References attr_coords.
Referenced by ome::qtwidgets::gl::v20::Grid2D::render().
void ome::qtwidgets::glsl::v110::GLLineShader2D::setColour | ( | const GLfloat * | offset, |
int | tupleSize, | ||
int | stride = 0 |
||
) |
Set colours from array.
offset | data offset if using a buffer object otherwise the colour values. |
tupleSize | the tuple size of the data. |
stride | the stride of the data. |
References attr_colour.
Referenced by ome::qtwidgets::gl::v20::Grid2D::render(), and setColour().
void ome::qtwidgets::glsl::v110::GLLineShader2D::setColour | ( | QOpenGLBuffer & | colours, |
const GLfloat * | offset, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
Set colours from buffer object.
colours | the colour values; null if using a buffer object. |
offset | the offset into the colours buffer. |
tupleSize | the tuple size of the data. |
stride | the 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.
offset | data offset if using a buffer object otherwise the coordinate values. |
tupleSize | the tuple size of the data. |
stride | the stride of the data. |
References attr_coords.
Referenced by ome::qtwidgets::gl::v20::Grid2D::render(), and setCoords().
void ome::qtwidgets::glsl::v110::GLLineShader2D::setCoords | ( | QOpenGLBuffer & | coords, |
const GLfloat * | offset, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
Set vertex coordinates from buffer object.
coords | the coordinate values; null if using a buffer object. |
offset | the offset into the coords buffer. |
tupleSize | the tuple size of the data. |
stride | the stride of the data. |
References setCoords().
void ome::qtwidgets::glsl::v110::GLLineShader2D::setModelViewProjection | ( | const glm::mat4 & | mvp | ) |
Set model view projection matrix.
mvp | the model view projection matrix. |
References uniform_mvp.
Referenced by ome::qtwidgets::gl::v20::Grid2D::render().
void ome::qtwidgets::glsl::v110::GLLineShader2D::setZoom | ( | float | zoom | ) |
Set zoom level.
zoom | the zoom level. |
References uniform_zoom.
Referenced by ome::qtwidgets::gl::v20::Grid2D::render().
|
private |
Vertex coordinates attribute.
Referenced by disableCoords(), enableCoords(), GLLineShader2D(), and setCoords().
|
private |
The fragment shader.
Referenced by GLLineShader2D().
|
private |
Model view projection uniform.
Referenced by GLLineShader2D(), and setModelViewProjection().
|
private |
The vertex shader.
Referenced by GLLineShader2D().