Gazebo Gui

API Reference

8.3.0
RenderThreadRhi Class Referenceabstract

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 ~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 RenderThreadRhiOpenGL, and RenderThreadRhiMetal.

◆ RenderNext()

virtual void RenderNext ( RenderSync *  _renderSync)
pure virtual

Render when safe.

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

Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.

◆ 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.

◆ ShutDown()

virtual void ShutDown ( )
pure virtual

Shutdown the thread and the render engine.

Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.

◆ Surface()

virtual QOffscreenSurface* Surface ( ) const
virtual

Offscreen surface to render to.

Reimplemented in RenderThreadRhiOpenGL.

◆ TexturePtr()

virtual void* TexturePtr ( ) const
pure virtual

Return a pointer to the graphics API texture Id.

Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.

◆ TextureSize()

virtual QSize TextureSize ( ) const
pure virtual

Return the size of the texture.

Implemented in RenderThreadRhiOpenGL, and RenderThreadRhiMetal.

◆ 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 RenderThreadRhiOpenGL, and RenderThreadRhiMetal.


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