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

2D flat (solid fill) shader program. More...

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

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

Public Member Functions

 GLFlatShader2D (QObject *parent=0)
 Constructor. More...
 
 ~GLFlatShader2D ()
 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 setColour (const glm::vec4 &colour)
 Set fill colour. More...
 
void setOffset (const glm::vec2 &offset)
 Set xy offset in model space. More...
 
void setModelViewProjection (const glm::mat4 &mvp)
 Set model view projection matrix. More...
 

Private Attributes

QOpenGLShader * vshader
 The vertex shader. More...
 
QOpenGLShader * fshader
 The fragment shader. More...
 
int attr_coords
 Vertex coordinates attribute. More...
 
int uniform_colour
 Fill colour uniform.
 
int uniform_offset
 Model offset uniform.
 
int uniform_mvp
 Model view projection uniform. More...
 

Detailed Description

2D flat (solid fill) shader program.

Constructor & Destructor Documentation

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

Constructor.

Parameters
parentthe parent of this object.

References attr_coords, fshader, uniform_colour, uniform_mvp, uniform_offset, and vshader.

Member Function Documentation

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

Enable vertex coordinates.

References attr_coords.

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

+ Here is the caller graph for this function:

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

Enable vertex coordinates.

References attr_coords.

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

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLFlatShader2D::setColour ( const glm::vec4 &  colour)

Set fill colour.

Parameters
colourthe RGBA fill colour.

References uniform_colour.

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

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLFlatShader2D::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::Axis2D::render(), and setCoords().

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLFlatShader2D::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::GLFlatShader2D::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::Axis2D::render().

+ Here is the caller graph for this function:

void ome::qtwidgets::glsl::v110::GLFlatShader2D::setOffset ( const glm::vec2 &  offset)

Set xy offset in model space.

Parameters
offsetthe offset to apply to the model.

References uniform_offset.

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

+ Here is the caller graph for this function:

Member Data Documentation

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

Vertex coordinates attribute.

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

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

The fragment shader.

Referenced by GLFlatShader2D().

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

Model view projection uniform.

Referenced by GLFlatShader2D(), and setModelViewProjection().

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

The vertex shader.

Referenced by GLFlatShader2D().


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