Gazebo Gui

API Reference

9.0.0
RenderThreadRhi Class Referenceabstract

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 ~RenderThreadRhi ( )
virtual

Destructor.

Member Function Documentation

◆ Context()

virtual QOpenGLContext * Context ( ) const
virtual

OpenGL context to be passed to the render engine.

Reimplemented in RenderThreadRhiOpenGL.

◆ Initialize()

virtual std::string 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()

virtual void RenderNext ( RenderSync *  _renderSync)
pure virtual

Render when safe.

Parameters
[in]_renderSyncRenderSync to safely synchronize Qt and worker thread (this)

Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.

◆ SetContext()

virtual void SetContext ( QOpenGLContext *  _context)
virtual

Set the OpenGL context to be passed to the render engine.

Parameters
[in]_contextOpenGL context

Reimplemented in RenderThreadRhiOpenGL.

◆ SetSurface()

virtual void SetSurface ( QOffscreenSurface *  _surface)
virtual

Set the offscreen surface to render to.

Parameters
[in]_surfaceOff-screen surface format

Reimplemented in RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.

◆ ShutDown()

virtual void ShutDown ( )
pure virtual

Shutdown the thread and the render engine.

Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.

◆ Surface()

virtual QOffscreenSurface * Surface ( ) const
virtual

Offscreen surface to render to.

Reimplemented in RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.

◆ TexturePtr()

virtual void * TexturePtr ( ) const
pure virtual

Return a pointer to the graphics API texture Id.

Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.

◆ TextureSize()

virtual QSize TextureSize ( ) const
pure virtual

Return the size of the texture.

Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.

◆ Update()

virtual void Update ( rendering::CameraPtr  _camera)
pure virtual

Update the texture for a camera.

Parameters
[in]_cameraPointer to the camera providing the texture

Implemented in RenderThreadRhiMetal, RenderThreadRhiOpenGL, and RenderThreadRhiVulkan.


The documentation for this class was generated from the following file: