Subset data structure. More...
Public Member Functions | |
Subset () | |
Constructor used to clean the data structure at startup. | |
~Subset () | |
Destructor used to destroy all allocated data when the structur is deleted. | |
Public Attributes | |
bool | ishidden |
Hidden flag (false by default) | |
Rendering flags | |
bool | fl_difftex |
Flag stating if the mesh has a diffuse texture. | |
bool | fl_lightmap |
Flag stating if the mesh has a light map. | |
bool | fl_normmap |
Flag stating if the mesh has a normal map. | |
bool | fl_dispmap |
Flag stating if the mesh has a displacement map. | |
Geometric Data | |
GLint | tri_count |
Number of triangles in this subset. | |
GLint | first |
First triangle (if they were numbered from 0 up in the mesh) | |
GLint * | ptex_indices |
The array of primary (diffuse) texture indices (m_tri_count*3 GLints) | |
GLint * | stex_indices |
The array of light map texture indices (m_tri_count*3 GLints) | |
GLint * | ntex_indices |
The array of normal map texture indices (m_tri_count*3 GLints) | |
GLint * | dtex_indices |
The array of displacement map texture indices (m_tri_count*3 GLints) | |
Material Data | |
VR3Material * | material |
Material associated to the mesh. | |
VAO and VBOs | |
GLuint | VAO |
VAO associated with the subset. | |
GLuint | VBOs [VR3MESH_MAX_VER_ATTRIBS] |
Mesh VBOs associated with the above VAO (vertex attributes in this subset) | |
Default shading program parameters | |
typedef void(VR3Mesh::* | f_loaduniforms )(const Subset *sub) |
Standard shader uniform loading function typedef. | |
GLuint | shader_program |
Shader program to be used by default for this mesh. | |
const GLint * | unilocs |
Pointer to the uniform location array defined for the default program. | |
f_loaduniforms | loadunifunc |
Function used to load uniform values in the current standard shader program. |
Subset data structure.
This structure contains data useful to identify informations available only with reference to a specific subset of the mesh.
Definition at line 93 of file VR3Mesh.h.
typedef void(VR3Mesh::* VR3Mesh::Subset::f_loaduniforms)(const Subset *sub) |
VR3Mesh::Subset::Subset | ( | ) |
Constructor used to clean the data structure at startup.
VR3Mesh::Subset::~Subset | ( | ) |
Destructor used to destroy all allocated data when the structur is deleted.
GLint VR3Mesh::Subset::first |
Function used to load uniform values in the current standard shader program.
When standard shading program is used, the following pointer is loaded with a reference to the function to use to load the uniform values. The function chosen only depends upon the rendering flags.
const GLint* VR3Mesh::Subset::unilocs |
GLuint VR3Mesh::Subset::VAO |
GLuint VR3Mesh::Subset::VBOs[VR3MESH_MAX_VER_ATTRIBS] |