NDEVR
API Documentation
GLESRenderObject

A root render Object for OpenGL, which consists of a set Material, Model, and Geometry that is used together to optimally create a 3D render. More...

Public Member Functions

 GLESRenderObject (const DynamicPointer< GLESGraphicsDevice > &pipeline)
 Constructs a GLESRenderObject for the given device.
 ~GLESRenderObject ()
 Destroys the render object and releases GPU resources.
void addInstance (const Geometry &geo, const Material &material)
 Adds a geometry instance with the given material.
void cleanup ()
 Releases all GPU resources held by this render object.
void commit (GraphicsUpdateArguments &args)
 Commits pending buffer changes to the GPU.
bool createPipeline (GraphicsUpdateArguments &args)
 Creates or recreates the rendering pipeline for this object.
fltp04 fadeDistance () const
 Returns the fade distance for this render object.
bool hasCommand () const
 Checks whether there is a pending render command.
bool hasImage () const
 Checks whether any material has a texture image.
bool hasOpacity () const
 Checks whether any material has opacity.
PrimitiveMode indexMode () const
 Returns the primitive drawing mode.
bool isFilledShape () const
 Checks whether this render object draws filled shapes.
const DynamicPointer< GLESMaterialManager > & materialManager () const
 Returns the material manager for this render object.
uint01 parity () const
 Returns the rendering parity of this object.
bool removeInstance (const Geometry &geo)
 Removes a geometry instance from this render object.
bool runCommand (GraphicsUpdateArguments &args, bool opacity_pass)
 Executes the render command for this object.
void setDevice (const DynamicPointer< GLESGraphicsDevice > &instance)
 Sets the graphics device for this render object.
void setMaterialManager (const DynamicPointer< GLESMaterialManager > &material_manager)
 Sets the material manager for this render object.
void setParity (uint01 parity)
 Sets the rendering parity.
void setPrimitiveMode (const PrimitiveMode &type)
 Sets the primitive drawing mode.
void setRelativeToCamera (bool reletive_to_camera)
 Sets whether rendering is relative to the camera position.
void setVertexManager (const DynamicPointer< GLESVertexManager > &vertex_manager)
 Sets the vertex manager for this render object.
bool shouldRender (const Model &model) const
 Checks whether the given model should be rendered.
void updateUniformBuffer (GraphicsUpdateArguments &args)
 Updates uniform buffers for all geometry instances.
const ConstPointer< GLESVertexManager > & vertexManager () const
 Returns the vertex manager for this render object.

Static Public Member Functions

static GLint RenderType (PrimitiveMode mode)
 Converts a PrimitiveMode to the corresponding OpenGL draw mode.

Detailed Description

A root render Object for OpenGL, which consists of a set Material, Model, and Geometry that is used together to optimally create a 3D render.


Definition at line 22 of file GLESRenderObject.h.

Constructor & Destructor Documentation

◆ GLESRenderObject()

GLESRenderObject::GLESRenderObject ( const DynamicPointer< GLESGraphicsDevice > & pipeline)

Constructs a GLESRenderObject for the given device.

Parameters
[in]pipelineThe OpenGL graphics device.

References GLESRenderObject().

Referenced by GLESRenderObject().

Member Function Documentation

◆ addInstance()

void GLESRenderObject::addInstance ( const Geometry & geo,
const Material & material )

Adds a geometry instance with the given material.

Parameters
[in]geoThe geometry to add.
[in]materialThe material for this instance.

References e_index_mode_size, and Outline.

◆ commit()

void GLESRenderObject::commit ( GraphicsUpdateArguments & args)

Commits pending buffer changes to the GPU.

Parameters
[in]argsThe graphics update context.

◆ createPipeline()

bool GLESRenderObject::createPipeline ( GraphicsUpdateArguments & args)

Creates or recreates the rendering pipeline for this object.

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

◆ fadeDistance()

fltp04 GLESRenderObject::fadeDistance ( ) const

Returns the fade distance for this render object.

Returns
The fade distance value.

◆ hasCommand()

bool GLESRenderObject::hasCommand ( ) const

Checks whether there is a pending render command.

Returns
True if there is geometry to render.

◆ hasImage()

bool GLESRenderObject::hasImage ( ) const

Checks whether any material has a texture image.

Returns
True if an image is present.

◆ hasOpacity()

bool GLESRenderObject::hasOpacity ( ) const

Checks whether any material has opacity.

Returns
True if opacity is present.

◆ indexMode()

PrimitiveMode GLESRenderObject::indexMode ( ) const
inline

Returns the primitive drawing mode.

Returns
The PrimitiveMode.

Definition at line 139 of file GLESRenderObject.h.

◆ isFilledShape()

bool GLESRenderObject::isFilledShape ( ) const

Checks whether this render object draws filled shapes.

Returns
True if shapes are filled.

◆ materialManager()

const DynamicPointer< GLESMaterialManager > & GLESRenderObject::materialManager ( ) const
inline

Returns the material manager for this render object.

Returns
A const reference to the material manager DynamicPointer.

Definition at line 127 of file GLESRenderObject.h.

◆ parity()

uint01 GLESRenderObject::parity ( ) const
inline

Returns the rendering parity of this object.

Returns
The parity value.

Definition at line 98 of file GLESRenderObject.h.

Referenced by setParity().

◆ removeInstance()

bool GLESRenderObject::removeInstance ( const Geometry & geo)

Removes a geometry instance from this render object.

Parameters
[in]geoThe geometry to remove.
Returns
True if the geometry was found and removed.

◆ RenderType()

GLint GLESRenderObject::RenderType ( PrimitiveMode mode)
static

Converts a PrimitiveMode to the corresponding OpenGL draw mode.

Parameters
[in]modeThe primitive mode.
Returns
The GLint OpenGL draw mode.

◆ runCommand()

bool GLESRenderObject::runCommand ( GraphicsUpdateArguments & args,
bool opacity_pass )

Executes the render command for this object.

Parameters
[in]argsThe graphics update context.
[in]opacity_passWhether this is the opacity rendering pass.
Returns
True if rendering was performed.

◆ setDevice()

void GLESRenderObject::setDevice ( const DynamicPointer< GLESGraphicsDevice > & instance)

Sets the graphics device for this render object.

Parameters
[in]instanceThe OpenGL graphics device.

◆ setMaterialManager()

void GLESRenderObject::setMaterialManager ( const DynamicPointer< GLESMaterialManager > & material_manager)

Sets the material manager for this render object.

Parameters
[in]material_managerThe material manager.

◆ setParity()

void GLESRenderObject::setParity ( uint01 parity)

Sets the rendering parity.

Parameters
[in]parityThe parity value.

References parity().

◆ setPrimitiveMode()

void GLESRenderObject::setPrimitiveMode ( const PrimitiveMode & type)
inline

Sets the primitive drawing mode.

Parameters
[in]typeThe primitive mode.

Definition at line 118 of file GLESRenderObject.h.

References type.

◆ setRelativeToCamera()

void GLESRenderObject::setRelativeToCamera ( bool reletive_to_camera)

Sets whether rendering is relative to the camera position.

Parameters
[in]reletive_to_cameraTrue for camera-relative rendering.

◆ setVertexManager()

void GLESRenderObject::setVertexManager ( const DynamicPointer< GLESVertexManager > & vertex_manager)

Sets the vertex manager for this render object.

Parameters
[in]vertex_managerThe vertex manager.

◆ shouldRender()

bool GLESRenderObject::shouldRender ( const Model & model) const

Checks whether the given model should be rendered.

Parameters
[in]modelThe model to check.
Returns
True if the model should be rendered.

◆ updateUniformBuffer()

void GLESRenderObject::updateUniformBuffer ( GraphicsUpdateArguments & args)

Updates uniform buffers for all geometry instances.

Parameters
[in]argsThe graphics update context.

◆ vertexManager()

const ConstPointer< GLESVertexManager > & GLESRenderObject::vertexManager ( ) const
inline

Returns the vertex manager for this render object.

Returns
A const reference to the vertex manager ConstPointer.

Definition at line 136 of file GLESRenderObject.h.


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