A mesh where the vertices/indices are dynamic.  
 More...
#include <OxygenEngine/render/mesh.h>
 | 
| template<typename V >  | 
|   | DynamicMesh (const V &, uint32_t max_count, const MeshUsage usage=MeshUsage::DYNAMIC) | 
|   | 
| template<typename V >  | 
|   | DynamicMesh (const V &, uint32_t max_vertices_count, uint32_t max_indices_count, const MeshUsage usage=MeshUsage::DYNAMIC) | 
|   | 
| void  | render (const uint32_t offset=0, const uint32_t mode=0x0004) | 
|   | 
| void  | renderElements (const uint32_t count, const uint32_t offset=0, const uint32_t mode=0x0004) | 
|   | 
| void  | setIndicesData (const uint32_t size, const void *data, const uint32_t offset=0) | 
|   | 
| std::pair< void *, void * >  | getRawBuffers () | 
|   | 
| 
void  | releaseRawBuffers () | 
|   | 
| void  | renderArrays (const uint32_t count, const uint32_t offset=0, const uint32_t mode=0x0004) | 
|   | 
| void  | setSubBufferData (const uint32_t size, const void *data, const uint32_t offset=0) | 
|   | 
| template<typename V >  | 
| void  | bindVertexAttributes () | 
|   | 
| 
void  | enableVertexAttribPointer (uint32_t index, size_t offset, size_t total, int32_t componentCount) | 
|   | 
| 
void  | enableVertexAttribIPointer (uint32_t index, size_t offset, size_t total, int32_t componentCount) | 
|   | 
| template<typename VertexType , typename T >  | 
| void  | bindVertexAttributeToPointer (const uint32_t index, const size_t offset) noexcept | 
|   | 
| 
template<typename ComponentType >  | 
| void  | bindVertexAttributeToPointer (uint32_t index, size_t offset, size_t total) noexcept | 
|   | 
 | 
| 
uint32_t  | _indices_size = 0 | 
|   | 
| 
uint32_t  | _ebo = 0 | 
|   | 
| 
uint32_t  | _vao = 0 | 
|   | 
| 
uint32_t  | _vbo = 0 | 
|   | 
| 
MeshUsage  | _usage | 
|   | 
 | 
| 
  | CommonMesh (MeshUsage usage) | 
|   | 
| 
void  | _prepare_mesh_vao (const size_t vertex_size, const size_t count, const void *data, const bool editable=false) | 
|   | 
| 
uint32_t  | _prepare_mesh_ebo (const size_t size, const void *data, const bool editable=false) | 
|   | 
| 
  | NonCopyable (NonCopyable &&)=default | 
|   | 
| 
NonCopyable &  | operator= (NonCopyable &&)=default | 
|   | 
A mesh where the vertices/indices are dynamic. 
- Note
 - You can start with a blank mesh: In this case, you should fill vertices/indices yourself with setSubBufferData() 
 
 
◆ DynamicMesh() [1/2]
Prepare buffers for a mesh without indices, in this case you should fill it yourself with setIndicesData() 
 
 
◆ DynamicMesh() [2/2]
template<typename V > 
  
  
      
        
          | oe::render::DynamicMesh::DynamicMesh  | 
          ( | 
          const V &  | 
          ,  | 
         
        
           | 
           | 
          uint32_t  | 
          max_vertices_count,  | 
         
        
           | 
           | 
          uint32_t  | 
          max_indices_count,  | 
         
        
           | 
           | 
          const MeshUsage  | 
          usage = MeshUsage::DYNAMIC  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Prepare buffers for a mesh with one set on indices 
 
 
◆ getRawBuffers()
      
        
          | std::pair< void *, void * > oe::render::DynamicMesh::getRawBuffers  | 
          ( | 
           | ) | 
           | 
        
      
 
Get raw buffer adresses 
- Returns
 - pair with vertex buffer and indices buffer adress
 
- Note
 - Hardcore things. Use only if you know what you are doing 
 
 
 
◆ render()
      
        
          | void oe::render::DynamicMesh::render  | 
          ( | 
          const uint32_t  | 
          offset = 0,  | 
        
        
           | 
           | 
          const uint32_t  | 
          mode = 0x0004  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Ask the GPU to render the complete mesh 
- Parameters
 - 
  
    | offset | id of first index  | 
    | mode | MeshDrawMode to specify how to render the mesh (default are triangles)  | 
  
   
 
 
◆ renderElements()
      
        
          | void oe::render::DynamicMesh::renderElements  | 
          ( | 
          const uint32_t  | 
          count,  | 
        
        
           | 
           | 
          const uint32_t  | 
          offset = 0,  | 
        
        
           | 
           | 
          const uint32_t  | 
          mode = 0x0004  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Ask the GPU to render part of the mesh 
- Parameters
 - 
  
    | mode | MeshDrawMode to specify how to render the mesh (default are triangles)  | 
  
   
 
 
◆ setIndicesData()
      
        
          | void oe::render::DynamicMesh::setIndicesData  | 
          ( | 
          const uint32_t  | 
          size,  | 
        
        
           | 
           | 
          const void *  | 
          data,  | 
        
        
           | 
           | 
          const uint32_t  | 
          offset = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Partial update of indices buffer 
 
 
The documentation for this class was generated from the following file: