Render interface class to handle OpenGL / Metal compatibility in RenderThread. More...
#include <MinimalSceneRhi.hh>
Public Member Functions | |
virtual | ~RenderThreadRhi () |
Destructor. More... | |
virtual QOpenGLContext * | Context () const |
OpenGL context to be passed to the render engine. More... | |
virtual std::string | Initialize ()=0 |
Carry out initialization. More... | |
virtual void | RenderNext (RenderSync *_renderSync)=0 |
Render when safe. More... | |
virtual void | SetContext (QOpenGLContext *_context) |
Set the OpenGL context to be passed to the render engine. More... | |
virtual void | SetSurface (QOffscreenSurface *_surface) |
Set the offscreen surface to render to. More... | |
virtual void | ShutDown ()=0 |
Shutdown the thread and the render engine. More... | |
virtual QOffscreenSurface * | Surface () const |
Offscreen surface to render to. More... | |
virtual void * | TexturePtr () const =0 |
Return a pointer to the graphics API texture Id. More... | |
virtual QSize | TextureSize () const =0 |
Return the size of the texture. More... | |
virtual void | Update (rendering::CameraPtr _camera)=0 |
Update the texture for a camera. More... | |
Detailed Description
Render interface class to handle OpenGL / Metal compatibility in RenderThread.
Constructor & Destructor Documentation
◆ ~RenderThreadRhi()
|
virtual |
Destructor.
Member Function Documentation
◆ Context()
|
virtual |
OpenGL context to be passed to the render engine.
Reimplemented in RenderThreadRhiOpenGL.
◆ Initialize()
|
pure virtual |
Carry out initialization.
On macOS this must be run on the main thread
- Returns
- Error message if initialization failed. If empty, no errors occurred.
Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.
◆ RenderNext()
|
pure virtual |
Render when safe.
- Parameters
-
[in] _renderSync RenderSync to safely synchronize Qt and worker thread (this)
Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.
◆ SetContext()
|
virtual |
Set the OpenGL context to be passed to the render engine.
- Parameters
-
[in] _context OpenGL context
Reimplemented in RenderThreadRhiOpenGL.
◆ SetSurface()
|
virtual |
Set the offscreen surface to render to.
- Parameters
-
[in] _surface Off-screen surface format
Reimplemented in RenderThreadRhiOpenGL.
◆ ShutDown()
|
pure virtual |
Shutdown the thread and the render engine.
Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.
◆ Surface()
|
virtual |
Offscreen surface to render to.
Reimplemented in RenderThreadRhiOpenGL.
◆ TexturePtr()
|
pure virtual |
Return a pointer to the graphics API texture Id.
Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.
◆ TextureSize()
|
pure virtual |
Return the size of the texture.
Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.
◆ Update()
|
pure virtual |
Update the texture for a camera.
- Parameters
-
[in] _camera Pointer to the camera providing the texture
Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.
The documentation for this class was generated from the following file: