3#include "GLESGraphicsDevice.h"
4#include <NDEVR/GraphicsUpdateArguments.h>
5#include <NDEVR/Material.h>
6#include <NDEVR/Geometry.h>
7#include <NDEVR/Model.h>
8#include <NDEVR/Matrix.h>
9#include <NDEVR/Pointer.h>
11class QOpenGLVertexArrayObject;
26 struct ModelProperties
37 bool should_render =
true;
45 fltp04 pixel_thickness = Constant<fltp04>::Invalid;
48 uint04 primitive_start = 0;
52 uint04 matrix_visible_size = 0;
53 uint04 matrix_reserved = 0;
54 bool is_visible =
true;
55 bool is_deleted =
false;
151 void geometryUpdate(GeoProperties& props);
159 bool modelUpdate(GeoProperties& props,
const Time& geo_mod_time,
uint04 idx,
uint04 matrix_index_count,
bool& should_remove);
162 void updatePixelThickness(GeoProperties& props);
190 uint04 m_vao = Constant<uint04>::Invalid;
191 volatile mutable bool m_needs_matrix_commit =
false;
192 volatile mutable bool m_needs_flags_commit =
false;
193 volatile mutable bool m_needs_offset_commit =
false;
194 volatile mutable bool m_needs_geometry_commit =
true;
195 uint01 m_parity = Constant<uint01>::Invalid;
196 bool m_is_integer_shader =
false;
197 bool m_is_tbn_shader =
false;
198 bool m_is_normal_shader =
false;
199 bool m_relative_to_camera =
false;
200 bool m_has_tangent =
false;
The equivelent of std::vector but with a bit more control.
A core object representing a user view as well as convenience functions for moving this view through ...
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
A hash-based key-value store, useful for quick associative lookups.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Structure responsible for handling the OpenGL data surrounding a particular Material object.
bool runCommand(GraphicsUpdateArguments &args, bool opacity_pass)
Executes the render command for this object.
GLESRenderObject(const DynamicPointer< GLESGraphicsDevice > &pipeline)
Constructs a GLESRenderObject for the given device.
void setParity(uint01 parity)
Sets the rendering parity.
bool hasOpacity() const
Checks whether any material has opacity.
void setMaterialManager(const DynamicPointer< GLESMaterialManager > &material_manager)
Sets the material manager for this render object.
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.
bool hasImage() const
Checks whether any material has a texture image.
fltp04 fadeDistance() const
Returns the fade distance for this render object.
bool createPipeline(GraphicsUpdateArguments &args)
Creates or recreates the rendering pipeline for this object.
void cleanup()
Releases all GPU resources held by this render object.
~GLESRenderObject()
Destroys the render object and releases GPU resources.
void setPrimitiveMode(const PrimitiveMode &type)
Sets the primitive drawing mode.
void updateUniformBuffer(GraphicsUpdateArguments &args)
Updates uniform buffers for all geometry instances.
void setDevice(const DynamicPointer< GLESGraphicsDevice > &instance)
Sets the graphics device for this render object.
static GLint RenderType(PrimitiveMode mode)
Converts a PrimitiveMode to the corresponding OpenGL draw mode.
void commit(GraphicsUpdateArguments &args)
Commits pending buffer changes to the GPU.
uint01 parity() const
Returns the rendering parity of this object.
PrimitiveMode indexMode() const
Returns the primitive drawing mode.
void addInstance(const Geometry &geo, const Material &material)
Adds a geometry instance with the given material.
const DynamicPointer< GLESMaterialManager > & materialManager() const
Returns the material manager for this render object.
bool removeInstance(const Geometry &geo)
Removes a geometry instance from this render object.
const ConstPointer< GLESVertexManager > & vertexManager() const
Returns the vertex manager for this render object.
bool isFilledShape() const
Checks whether this render object draws filled shapes.
bool hasCommand() const
Checks whether there is a pending render command.
Manages vertex buffers for the OpenGL engine.
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
Options that are used for performing an update on a Graphics Engine call.
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
Templated logic for doing matrix multiplication.
A core class that represents a node on model hierarchy.
Represents a timestamp with utilities for manipulation and conversion.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
The primary namespace for the NDEVR SDK.
@ type
The type identifier string for this model node.
PrimitiveMode
Used with Geometry to describe how vertices and indices are used to form shapes.
@ e_index_mode_size
The number of primitive modes. Used for sizing arrays.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
PrimitiveProperty
Describes which rendering property a primitive index buffer corresponds to.
@ Outline
Line-based outline rendering of primitives.