|
virtual void | render (std::shared_ptr< const Image > image, LayerType layerType=LayerType::Color, size_t idx=0) override |
|
virtual void | glSwapBuffers ()=0 |
|
virtual void | update () override |
|
virtual size2_t | getCanvasDimensions () const =0 |
|
virtual size2_t | getImageDimensions () const |
|
double | getDepthValueAtCoord (ivec2 canvasCoordinate) const |
| Retrieve depth value in normalized device coordinates at screen coordinate.
|
|
double | getDepthValueAtNormalizedCoord (dvec2 normalizedScreenCoordinate) const |
|
virtual void | activate ()=0 |
|
void | setEventPropagator (EventPropagator *propagator) |
|
virtual std::unique_ptr< Canvas > | createHiddenCanvas ()=0 |
|
virtual ContextID | activeContext () const =0 |
|
virtual ContextID | contextId () const =0 |
|
virtual void | releaseContext ()=0 |
|
|
static void | defaultGLState () |
|
|
void | setupDebug () |
|
void | renderLayer () |
|
void | renderNoise () |
|
void | drawSquare () |
|
void | renderTexture (int) |
|
bool | ready () |
|
|
std::weak_ptr< const Image > | image_ |
|
std::unique_ptr< Mesh > | square_ |
|
const MeshGL * | squareGL_ = nullptr |
| Non-owning reference.
|
|
bool | ready_ = false |
|
LayerType | layerType_ = LayerType::Color |
|
size_t | layerIdx_ = 0 |
|
Shader * | textureShader_ = nullptr |
| non-owning reference
|
|
Shader * | noiseShader_ = nullptr |
| non-owning reference
|
|
EventPropagator * | propagator_ |
|
PickingController | pickingController_ |
|
|
using | ContextID = const void* |
|
◆ getDepthValueAtCoord()
double inviwo::CanvasGL::getDepthValueAtCoord |
( |
ivec2 | canvasCoordinate | ) |
const |
Retrieve depth value in normalized device coordinates at screen coordinate.
Depth is defined in [-1 1], where -1 is the near plane and 1 is the far plane. Will be 1 if no depth value is available.
- Parameters
-
canvasCoordinate | Canvas coordinates [0 dim-1]^2 |
- Returns
- NDC depth in [-1 1], 1 if no depth value exist.
◆ ready()
bool inviwo::CanvasGL::ready |
( |
| ) |
|
|
protected |
Sometime on OSX in renderNoise when on the first time using a canvas we get a INVALID_FRAMEBUFFER_OPERATION error to avoid this we have this ready flag to check that the frame buffer is complete.
◆ render()
virtual void inviwo::CanvasGL::render |
( |
std::shared_ptr< const Image > | image, |
|
|
LayerType | layerType = LayerType::Color, |
|
|
size_t | idx = 0 ) |
|
overridevirtual |
◆ update()
virtual void inviwo::CanvasGL::update |
( |
| ) |
|
|
overridevirtual |
◆ squareGL_
const MeshGL* inviwo::CanvasGL::squareGL_ = nullptr |
|
protected |
Non-owning reference.
Each canvas must have its own MeshGL since the vertex array object in MeshGL cannot be shared.
The documentation for this class was generated from the following file: