The RenderApp::DRW inner class is an Attorney that allow access to some private member functions of the RenderApp class to the Drawer classes.
More...
#include <vclib/render/render_app.h>
The RenderApp::DRW inner class is an Attorney that allow access to some private member functions of the RenderApp class to the Drawer classes.
The member functions of the RenderApp::DRW inner class can be called only by the Drawer classes. For example, to call the canvasFrameBuffer member function, the Drawer can call it in the following way:
static auto canvasFrameBuffer(const RenderApp *r)
A Drawer object can request the frame buffer of the canvas.
Definition render_app.h:709
The RenderApp class is a template class that combines a canvas, a window manager, and a set of drawer...
Definition render_app.h:67
◆ canvasFrameBuffer()
A Drawer object can request the frame buffer of the canvas.
This function is called by the Drawer object to request the frame buffer of the canvas, that can be used to draw on it.
- Warning
- This function is supported only if the backend is bgfx.
- Returns
- The frame buffer of the canvas.
◆ canvasSize()
A Drawer object can request the size of the canvas. This function is called by the Drawer object to request the size of the canvas.
- Returns
- The size of the canvas.
// TODO is this actually necessary???
◆ readDepth()
A Drawer object can request the depth value at a specific point on the canvas. This function is called by the Drawer object to request the depth value at the specified point.
- Parameters
-
[in] | point | The point on the canvas where the depth value must be read. |
[in] | callback | The callback function that will be called when the depth value is read. The callback function should have the following signature: void callback(const ReadData& value) , where value float depth value read from the canvas. |
- Returns
- true if the depth requeste is successfully submitted, false otherwise.
◆ readId()
A Drawer object can request the ID at a specific point on the canvas. This function is called by the Drawer object to request the ID at the specified point.
- Parameters
-
[in] | point | The point on the canvas where the ID must be read. |
[in] | callback | The callback function that will be called when the ID is read. The callback function should have the following signature: void callback(const ReadData& value) , where value is the ID value read from the canvas encoded into 4 bytes (unsigned 32 bit integer). |
- Returns
- true if the ID request is successfully submitted, false otherwise.
◆ screenshot()
A Drawer object can request a screenshot of the canvas. This function is called by the Drawer object to request a screenshot of the canvas.
- Parameters
-
[in] | filename | The filename where the screenshot will be saved. |
[in] | multiplier | The multiplier that will be applied to the canvas image. The default value is 1. |
◆ setCanvasDefaultClearColor()
A Drawer object can set the default clear color of the canvas.
This function is called by the Drawer object to set the default clear color of the canvas.
- Parameters
-
color | The new default clear color of the canvas. |
◆ windowPtr()
A Drawer object can request the window pointer of the window manager (the exact meaning of the window pointer depends on the window manager implementation).
To get the window pointer, the Drawer object can call the windowPtr()
function. To know the exact meaning of the window pointer, the Drawer object should refer to the documentation of the specific window manager implementation, and check the WINDOW_MANAGER_ID of the window manager, that is a static constant of the WindowManager class.
- Parameters
-
- Returns
The documentation for this class was generated from the following file: