ome-qtwidgets 5.3.2

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

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

`#include <ome/qtwidgets/glsl/v330/V330GLFlatShader2D.h>`

Inheritance diagram for ome::qtwidgets::glsl::v330::GLFlatShader2D:
[legend]
Collaboration diagram for ome::qtwidgets::glsl::v330::GLFlatShader2D:
[legend]

## 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

## § GLFlatShader2D()

ome::qtwidgets::glsl::v330::GLFlatShader2D::GLFlatShader2D | ( | QObject * | parent = `0` | ) |
| explicit

Constructor.

Parameters

  parent | the parent of this object.

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

## Member Function Documentation

## § disableCoords()

void ome::qtwidgets::glsl::v330::GLFlatShader2D::disableCoords | ( |  | ) |

Enable vertex coordinates.

References attr_coords.

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

Here is the caller graph for this function:

## § enableCoords()

void ome::qtwidgets::glsl::v330::GLFlatShader2D::enableCoords | ( |  | ) |

Enable vertex coordinates.

References attr_coords.

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

Here is the caller graph for this function:

## § setColour()

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

Set fill colour.

Parameters

  colour | the RGBA fill colour.

References uniform_colour.

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

Here is the caller graph for this function:

## § setCoords() [1/2]

void ome::qtwidgets::glsl::v330::GLFlatShader2D::setCoords | ( | const GLfloat * | offset,
|  | int | tupleSize,
|  | int | stride = `0`
| ) |  |

Set vertex coordinates from array.

Parameters

  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::v33::Axis2D::render(), and setCoords().

Here is the caller graph for this function:

## § setCoords() [2/2]

void ome::qtwidgets::glsl::v330::GLFlatShader2D::setCoords | ( | QOpenGLBuffer & | coords,
|  | const GLfloat * | offset,
|  | int | tupleSize,
|  | int | stride = `0`
| ) |  |

Set vertex coordinates from buffer object.

Parameters

  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().

## § setModelViewProjection()

void ome::qtwidgets::glsl::v330::GLFlatShader2D::setModelViewProjection | ( | const glm::mat4 & | mvp | ) |

Set model view projection matrix.

Parameters

  mvp | the model view projection matrix.

References uniform_mvp.

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

Here is the caller graph for this function:

## § setOffset()

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

Set xy offset in model space.

Parameters

  offset | the offset to apply to the model.

References uniform_offset.

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

Here is the caller graph for this function:

## Member Data Documentation

## § attr_coords

int ome::qtwidgets::glsl::v330::GLFlatShader2D::attr_coords
| private

Vertex coordinates attribute.

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

## § fshader

QOpenGLShader* ome::qtwidgets::glsl::v330::GLFlatShader2D::fshader
| private

The fragment shader.

Referenced by GLFlatShader2D().

## § uniform_mvp

int ome::qtwidgets::glsl::v330::GLFlatShader2D::uniform_mvp
| private

Model view projection uniform.

Referenced by GLFlatShader2D(), and setModelViewProjection().

## § vshader

QOpenGLShader* ome::qtwidgets::glsl::v330::GLFlatShader2D::vshader
| private

The vertex shader.

Referenced by GLFlatShader2D().

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

- ome/qtwidgets/glsl/v330/V330GLFlatShader2D.h
- ome/qtwidgets/glsl/v330/V330GLFlatShader2D.cpp