Render interface class to handle OpenGL / Metal compatibility in RenderThread. More...
#include <MinimalSceneRhi.hh>
| Public Member Functions | |
| virtual | ~RenderThreadRhi () | 
| Destructor. | |
| virtual QOpenGLContext * | Context () const | 
| OpenGL context to be passed to the render engine. | |
| virtual std::string | Initialize ()=0 | 
| Carry out initialization. | |
| virtual void | RenderNext (RenderSync *_renderSync)=0 | 
| Render when safe. | |
| virtual void | SetContext (QOpenGLContext *_context) | 
| Set the OpenGL context to be passed to the render engine. | |
| virtual void | SetSurface (QOffscreenSurface *_surface) | 
| Set the offscreen surface to render to. | |
| virtual void | ShutDown ()=0 | 
| Shutdown the thread and the render engine. | |
| virtual QOffscreenSurface * | Surface () const | 
| Offscreen surface to render to. | |
| virtual void * | TexturePtr () const =0 | 
| Return a pointer to the graphics API texture Id. | |
| virtual QSize | TextureSize () const =0 | 
| Return the size of the texture. | |
| virtual void | Update (rendering::CameraPtr _camera)=0 | 
| Update the texture for a camera. | |
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 RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.
◆ RenderNext()
| 
 | pure virtual | 
Render when safe.
- Parameters
- 
  [in] _renderSync RenderSync to safely synchronize Qt and worker thread (this) 
Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.
◆ 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, and RenderThreadRhiVulkan.
◆ ShutDown()
| 
 | pure virtual | 
Shutdown the thread and the render engine.
Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.
◆ Surface()
| 
 | virtual | 
Offscreen surface to render to.
Reimplemented in RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.
◆ TexturePtr()
| 
 | pure virtual | 
Return a pointer to the graphics API texture Id.
Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.
◆ TextureSize()
| 
 | pure virtual | 
Return the size of the texture.
Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.
◆ Update()
| 
 | pure virtual | 
Update the texture for a camera.
- Parameters
- 
  [in] _camera Pointer to the camera providing the texture 
Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.
The documentation for this class was generated from the following file: