NDEVR
API Documentation
GLESGraphicsSession

Creates and manages the resources necessary for converting a DesignObjectLookup into 3D rendered data in the OpenGL engine. More...

Inheritance diagram for GLESGraphicsSession:
[legend]
Collaboration diagram for GLESGraphicsSession:
[legend]

Public Member Functions

 GLESGraphicsSession (const DynamicPointer< GLESGraphicsDevice > &device)
 Constructs a GLESGraphicsSession for the given device.
virtual ~GLESGraphicsSession () override
 Destroys the session and releases all managed resources.
bool addRenderGeometry (const Geometry &geo) override
 Adds a geometry to the render pipeline.
virtual void checkModelStructure (GraphicsUpdateArguments &args)
 Checks whether the model structure has changed and updates accordingly.
bool checkPipeline (bool add_if_needed)
 Validates and optionally creates the render pipeline.
bool checkPipeline (GeometryUpdateObject &geo_prop, bool add_if_needed)
 Validates and optionally creates the pipeline for a specific geometry.
virtual void cleanResources () override
 No-op resource cleanup.
virtual void cleanup () override
 No-op cleanup.
void clearAll ()
 Clears all render objects, managers, and cached state.
virtual void commit (GraphicsUpdateArguments &args) override
 Commits all pending changes to the GPU.
virtual bool createPipeline (GraphicsUpdateArguments &args) override
 Creates or recreates the rendering pipeline.
virtual DynamicPointer< GraphicsPipelinecreateRenderPipeline () override
 Creates a new render pipeline for a viewport.
virtual const ConstPointer< GraphicsDevice > & device () const override
 Returns the graphics device as a const pointer.
virtual const DynamicPointer< GraphicsDevice > & device () override
 Returns the graphics device as a mutable pointer.
virtual void drawFrame (GraphicsUpdateArguments &args) override
 Draws one complete frame.
virtual void ensureLastRenderComplete () override
 No-op to ensure the last render is complete.
DynamicPointer< GLESCameraManagergetCameraManager (const UUID &camera)
 Returns or creates a camera manager for the given camera UUID.
virtual bool hasCommand () const override
 Checks whether there is a pending command.
virtual void init (GraphicsUpdateArguments &args) override
 Initializes the graphics session for rendering.
virtual void postClearAll () override
 No-op post-clear callback.
virtual void readShader (const StringView &) override
 No-op shader reader for the GLES session.
void removeRenderGeometry (const Geometry &geo) override
 Removes a geometry from the render pipeline.
virtual bool runCommand (GraphicsUpdateArguments &) override
 No-op command runner for the GLES session.
virtual void setWindowInstance (WindowInstance *) override
 No-op window instance setter.
virtual void updateUniformBuffer (GraphicsUpdateArguments &args) override
 Updates all uniform buffers for the current frame.
virtual UUID uuid () override
 Returns the UUID of this graphics session.
Public Member Functions inherited from GraphicsSession
virtual ~GraphicsSession ()
 Destructor.
virtual void addCamera (const UUID &object)
 Adds a camera to this session.
bool isActive () const
 Checks whether this session is active.
virtual void removeCamera (const UUID &camera)
 Removes a camera from this session.
void setActive (bool active)
 Sets whether this session is active.
Public Member Functions inherited from GraphicsPipeline
virtual ~GraphicsPipeline ()
 Destructor.

Static Public Member Functions

static const DynamicPointer< GraphicsSession > & DefaultSession ()
 Returns the default singleton graphics session.
static UUID GLESRenderEngineID ()
 Returns the UUID identifying the GLES render engine.

Protected Attributes

Dictionary< UUID, DynamicPointer< GLESCameraManager > > m_camera_managers
 Per-camera camera managers.
DynamicPointer< GLESGraphicsDevicem_device
 The GLES graphics device.
Buffer< GeometryUpdateObjectm_geometries
 All tracked geometry update objects.
DynamicPointer< GraphicsDevicem_graphics_device
 The abstract graphics device.
DynamicPointer< GLESImageManagerm_image_manager
 The shared image manager.
Dictionary< uint08, DynamicPointer< GLESMaterialManager > > m_material_managers
 Per-material material managers.
Dictionary< uint08, GLESRenderObject * > m_pipelines
 Per-material render object pipelines.
DynamicPointer< GLESShaderManagerm_shader_manager
 The shared shader manager.
Dictionary< UUID, DynamicPointer< GLESVertexManager > > m_vertex_managers
 Per-scene vertex managers.
Protected Attributes inherited from GraphicsSession
Buffer< UUIDm_added_cameras
 Cameras registered with this session.
bool m_is_active = false
 Whether this session is currently active.
bool m_needs_clear_all = false
 Whether a full clear is pending.
bool m_needs_command_refresh = false
 Whether command buffers need refreshing.

Additional Inherited Members

Public Types inherited from GraphicsSession
enum  AddObjectMode { e_add_object , e_ensure_pipeline , e_ensure_pipeline_and_add }
 Modes for adding objects to the session. More...

Detailed Description

Creates and manages the resources necessary for converting a DesignObjectLookup into 3D rendered data in the OpenGL engine.


Definition at line 25 of file GLESGraphicsSession.h.

Constructor & Destructor Documentation

◆ GLESGraphicsSession()

GLESGraphicsSession::GLESGraphicsSession ( const DynamicPointer< GLESGraphicsDevice > & device)

Constructs a GLESGraphicsSession for the given device.

Parameters
[in]deviceThe OpenGL graphics device.

References device().

Referenced by DefaultSession().

Member Function Documentation

◆ addRenderGeometry()

bool GLESGraphicsSession::addRenderGeometry ( const Geometry & geo)
overridevirtual

Adds a geometry to the render pipeline.

Parameters
[in]geoThe geometry to add.
Returns
True if the geometry was successfully added.

Implements GraphicsSession.

◆ checkModelStructure()

virtual void GLESGraphicsSession::checkModelStructure ( GraphicsUpdateArguments & args)
virtual

Checks whether the model structure has changed and updates accordingly.

Parameters
[in]argsThe graphics update context.

◆ checkPipeline() [1/2]

bool GLESGraphicsSession::checkPipeline ( bool add_if_needed)

Validates and optionally creates the render pipeline.

Parameters
[in]add_if_neededWhether to create missing pipeline entries.
Returns
True if the pipeline is valid.

◆ checkPipeline() [2/2]

bool GLESGraphicsSession::checkPipeline ( GeometryUpdateObject & geo_prop,
bool add_if_needed )

Validates and optionally creates the pipeline for a specific geometry.

Parameters
[in]geo_propThe geometry update object to check.
[in]add_if_neededWhether to create missing pipeline entries.
Returns
True if the pipeline is valid.

◆ commit()

virtual void GLESGraphicsSession::commit ( GraphicsUpdateArguments & args)
overridevirtual

Commits all pending changes to the GPU.

Parameters
[in]argsThe graphics update context.

Implements GraphicsPipeline.

◆ createPipeline()

virtual bool GLESGraphicsSession::createPipeline ( GraphicsUpdateArguments & args)
overridevirtual

Creates or recreates the rendering pipeline.

Parameters
[in]argsThe graphics update context.
Returns
True if the pipeline was created successfully.

Implements GraphicsPipeline.

◆ createRenderPipeline()

virtual DynamicPointer< GraphicsPipeline > GLESGraphicsSession::createRenderPipeline ( )
overridevirtual

Creates a new render pipeline for a viewport.

Returns
A DynamicPointer to the new GraphicsPipeline.

Implements GraphicsSession.

◆ DefaultSession()

const DynamicPointer< GraphicsSession > & GLESGraphicsSession::DefaultSession ( )
inlinestatic

Returns the default singleton graphics session.

Returns
A const reference to the default session DynamicPointer.

Definition at line 52 of file GLESGraphicsSession.h.

References GLESGraphicsSession(), ViewportOptions::default_render_engine, GLESGraphicsDevice::DefaultGLESDevice(), and GLESRenderEngineID().

Referenced by GLESCameraViewFactory::canCreateView().

◆ device() [1/2]

virtual const ConstPointer< GraphicsDevice > & GLESGraphicsSession::device ( ) const
overridevirtual

Returns the graphics device as a const pointer.

Returns
A const reference to the device ConstPointer.

Implements GraphicsPipeline.

Referenced by GLESGraphicsSession().

◆ device() [2/2]

virtual const DynamicPointer< GraphicsDevice > & GLESGraphicsSession::device ( )
overridevirtual

Returns the graphics device as a mutable pointer.

Returns
A const reference to the device DynamicPointer.

Implements GraphicsPipeline.

◆ drawFrame()

virtual void GLESGraphicsSession::drawFrame ( GraphicsUpdateArguments & args)
overridevirtual

Draws one complete frame.

Parameters
[in]argsThe graphics update context.

Implements GraphicsPipeline.

◆ getCameraManager()

DynamicPointer< GLESCameraManager > GLESGraphicsSession::getCameraManager ( const UUID & camera)

Returns or creates a camera manager for the given camera UUID.

Parameters
[in]cameraThe camera UUID.
Returns
A DynamicPointer to the GLESCameraManager.

◆ GLESRenderEngineID()

UUID GLESGraphicsSession::GLESRenderEngineID ( )
inlinestatic

Returns the UUID identifying the GLES render engine.

Returns
The GLES render engine UUID.

Definition at line 49 of file GLESGraphicsSession.h.

References UUID::CreateUUID().

Referenced by DefaultSession(), and uuid().

◆ hasCommand()

virtual bool GLESGraphicsSession::hasCommand ( ) const
inlineoverridevirtual

Checks whether there is a pending command.

Returns
Always true.

Implements GraphicsPipeline.

Definition at line 118 of file GLESGraphicsSession.h.

◆ init()

virtual void GLESGraphicsSession::init ( GraphicsUpdateArguments & args)
overridevirtual

Initializes the graphics session for rendering.

Parameters
[in]argsThe graphics update context.

Implements GraphicsPipeline.

◆ removeRenderGeometry()

void GLESGraphicsSession::removeRenderGeometry ( const Geometry & geo)
overridevirtual

Removes a geometry from the render pipeline.

Parameters
[in]geoThe geometry to remove.

Implements GraphicsSession.

◆ runCommand()

virtual bool GLESGraphicsSession::runCommand ( GraphicsUpdateArguments & )
inlineoverridevirtual

No-op command runner for the GLES session.

Returns
Always true.

Implements GraphicsPipeline.

Definition at line 93 of file GLESGraphicsSession.h.

◆ updateUniformBuffer()

virtual void GLESGraphicsSession::updateUniformBuffer ( GraphicsUpdateArguments & args)
overridevirtual

Updates all uniform buffers for the current frame.

Parameters
[in]argsThe graphics update context.

Implements GraphicsPipeline.

◆ uuid()

virtual UUID GLESGraphicsSession::uuid ( )
inlineoverridevirtual

Returns the UUID of this graphics session.

Returns
The GLES render engine UUID.

Implements GraphicsSession.

Definition at line 78 of file GLESGraphicsSession.h.

References GLESRenderEngineID().


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