SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
SP::SPMeshBuffer Class Reference
Inheritance diagram for SP::SPMeshBuffer:
Inheritance graph
[legend]

Public Member Functions

virtual void draw (DrawCallType dct=DCT_NORMAL, int material_id=-1) const
 
virtual void uploadGLMesh ()
 
virtual void uploadInstanceData ()
 
bool combineMeshBuffer (SPMeshBuffer *spmb, bool different_material=true)
 
void initDrawMaterial ()
 
void enableSkinningData ()
 
MaterialgetSTKMaterial (unsigned first_index=0) const
 
void enableTextureMatrix (unsigned mat_id)
 
std::array< std::shared_ptr< SPTexture >, 6 > & getSPTextures (unsigned first_index=0)
 
const std::array< std::shared_ptr< SPTexture >, 6 > & getSPTexturesByMaterialID (int material_id) const
 
std::vector< Material * > getAllSTKMaterials () const
 
const std::unordered_map< std::string, unsigned > & getTextureCompare () const
 
int getMaterialID (const std::string &tex_cmp) const
 
void addInstanceData (const SPInstancedData &id, DrawCallType dct)
 
void recreateVAO (unsigned i)
 
video::S3DVertexSkinnedMesh * getSPMVertex ()
 
void addSPMVertex (const video::S3DVertexSkinnedMesh &v)
 
void addIndex (uint16_t idx)
 
void setSPMVertices (std::vector< video::S3DVertexSkinnedMesh > &vertices)
 
void setIndices (std::vector< uint16_t > &indices)
 
void setSTKMaterial (Material *m)
 
void reloadTextureCompare ()
 
void shrinkToFit ()
 
SPShadergetShader (bool skinned=false) const
 
virtual const video::SMaterial & getMaterial () const
 
virtual video::SMaterial & getMaterial ()
 
virtual const void * getVertices () const
 
virtual void * getVertices ()
 
std::vector< video::S3DVertexSkinnedMesh > & getVerticesRef ()
 
virtual u32 getVertexCount () const
 
virtual video::E_INDEX_TYPE getIndexType () const
 
std::vector< u16 > & getIndicesRef ()
 
virtual const u16 * getIndices () const
 
virtual u16 * getIndices ()
 
virtual u32 getIndexCount () const
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const
 
virtual void setBoundingBox (const core::aabbox3df &box)
 
virtual void recalculateBoundingBox ()
 
virtual video::E_VERTEX_TYPE getVertexType () const
 
virtual const core::vector3df & getPosition (u32 i) const
 
virtual core::vector3df & getPosition (u32 i)
 
virtual const core::vector3df & getNormal (u32 i) const
 
virtual core::vector3df & getNormal (u32 i)
 
virtual const core::vector2df & getTCoords (u32 i) const
 
virtual core::vector2df & getTCoords (u32 i)
 
virtual scene::E_PRIMITIVE_TYPE getPrimitiveType () const
 
virtual void append (const void *const vertices, u32 numm_vertices, const u16 *const indices, u32 numm_indices)
 
virtual void append (const IMeshBuffer *const other)
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex () const
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index () const
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING, E_BUFFER_TYPE Buffer)
 
virtual void setDirty (E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
 
virtual u32 getChangedID_Vertex () const
 
virtual u32 getChangedID_Index () const
 
- Public Member Functions inherited from SP::SPPerObjectUniform
void addAssignerFunction (const std::string &name, std::function< void(SPUniformAssigner *)> func)
 
void removeAssignerFunction (const std::string &name)
 
bool hasUniform (const std::string &name) const
 
bool assignUniform (const std::string &name, SPUniformAssigner *ua) const
 
bool isEmpty () const
 

Protected Attributes

std::shared_ptr< SPShaderm_shaders [2]
 
std::vector< std::tuple< size_t, unsigned, Material * > > m_stk_material
 
std::vector< std::array< std::shared_ptr< SPTexture >, 6 > > m_textures
 
std::unordered_map< std::string, unsigned > m_tex_cmp
 
std::vector< video::S3DVertexSkinnedMesh > m_vertices
 
GLuint m_ibo
 
GLuint m_vbo
 
GLuint m_vao [DCT_FOR_VAO]
 
unsigned m_pitch
 

Private Member Functions

bool initTexture ()
 

Private Attributes

std::vector< uint16_t > m_indices
 
core::aabbox3d< f32 > m_bounding_box
 
std::vector< SPInstancedDatam_ins_dat [DCT_FOR_VAO]
 
void * m_ins_dat_mapped_ptr [DCT_FOR_VAO]
 
unsigned m_gl_instance_size [DCT_FOR_VAO]
 
GLuint m_ins_array [DCT_FOR_VAO]
 
bool m_uploaded_gl
 
bool m_uploaded_instance
 
bool m_skinned
 

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