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:684
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. TODO: explain the callback function signature. |
- Returns
- true if the depth value is successfully read, 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] | width | The width of the screenshot. If 0, the width of the canvas will be used. |
[in] | height | The height of the screenshot. If 0, the height of the canvas will be used. |
◆ 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: