Pure virtual class to implement rendering separated from the widget and makes the sf::OpenGLWidget the placeholder.
More...
#include <OpenGLRenderer.h>
|
| OpenGLRenderer (OpenGLWidget *widget, QOpenGLShaderProgram *sp) |
| Constructor passing the widget which has the OpenGL context. The owner is the shader program object.
|
|
| ~OpenGLRenderer () override=default |
| Virtual destructor.
|
|
bool | setup () |
| Call overridden method generate() after teh shader program has been linked.
|
|
void | render () |
| Call overridden method render() after teh shader program has been linked.
|
|
OpenGLWidget * | getWidget () const |
| Gets the owning widget which is calling the shots.
|
|
virtual void | changedProperty ()=0 |
| Called by sf::OpenGLWidget when a property has changed.
|
|
virtual void | setIndexValue (int index, QVariant value)=0 |
| Sets an arbitrary value on the derived- or subclass.
|
|
bool | isMain () const |
| Tells if this instance is the first renderer or not.
|
|
|
virtual void | generate ()=0 |
| Called by setup() and (re-)generates the vertices for the drawn 3D-objects.
|
|
virtual void | paint ()=0 |
| Called by from the render() method.
|
|
virtual void | draw ()=0 |
| Called by from the render() method.
|
|
Pure virtual class to implement rendering separated from the widget and makes the sf::OpenGLWidget the placeholder.
◆ OpenGLRenderer()
sf::OpenGLRenderer::OpenGLRenderer |
( |
OpenGLWidget * |
widget, |
|
|
QOpenGLShaderProgram * |
sp |
|
) |
| |
|
explicit |
Constructor passing the widget which has the OpenGL context. The owner is the shader program object.
◆ ~OpenGLRenderer()
sf::OpenGLRenderer::~OpenGLRenderer |
( |
| ) |
|
|
overridedefault |
◆ changedProperty()
virtual void sf::OpenGLRenderer::changedProperty |
( |
| ) |
|
|
pure virtual |
◆ draw()
virtual void sf::OpenGLRenderer::draw |
( |
| ) |
|
|
protectedpure virtual |
◆ generate()
virtual void sf::OpenGLRenderer::generate |
( |
| ) |
|
|
protectedpure virtual |
◆ getWidget()
Gets the owning widget which is calling the shots.
◆ initialize()
static void sf::OpenGLRenderer::initialize |
( |
OpenGLWidget * |
widget | ) |
|
|
static |
◆ isMain()
bool sf::OpenGLRenderer::isMain |
( |
| ) |
const |
Tells if this instance is the first renderer or not.
- Returns
◆ paint()
virtual void sf::OpenGLRenderer::paint |
( |
| ) |
|
|
protectedpure virtual |
◆ render()
void sf::OpenGLRenderer::render |
( |
| ) |
|
Call overridden method render() after teh shader program has been linked.
◆ setIndexValue()
virtual void sf::OpenGLRenderer::setIndexValue |
( |
int |
index, |
|
|
QVariant |
value |
|
) |
| |
|
pure virtual |
◆ setup()
bool sf::OpenGLRenderer::setup |
( |
| ) |
|
Call overridden method generate() after teh shader program has been linked.
◆ _cameraMatrix
const QMatrix4x4& sf::OpenGLRenderer::_cameraMatrix |
|
protected |
◆ _lightDirectionMatrix
const QMatrix4x4& sf::OpenGLRenderer::_lightDirectionMatrix |
|
protected |
Easy of access reference to the light direction matrix from the sf::OpenGLWidget.
◆ _lightPositionMatrix
const QMatrix4x4& sf::OpenGLRenderer::_lightPositionMatrix |
|
protected |
Easy of access reference to the light position matrix from the sf::OpenGLWidget.
◆ _modelMatrix
const QMatrix4x4& sf::OpenGLRenderer::_modelMatrix |
|
protected |
◆ _projectionMatrix
const QMatrix4x4& sf::OpenGLRenderer::_projectionMatrix |
|
protected |
Easy of access reference to the projection matrix from the widget.
The documentation for this class was generated from the following file: