69 #ifndef __gVirtualXRayConfig_h 161 const unsigned int aNumberOfVertices = 0,
162 unsigned int aNumberOfCompontentsPerVertex = 0,
163 int aVertexDataType = 0,
164 const void* apVertices = 0,
165 const unsigned int aNumberOfNormals = 0,
166 unsigned int aNumberOfCompontentsPerNormal = 0,
167 int aNormalDataType = 0,
168 const void* apNormals = 0,
169 const unsigned int aNumberOfTextureCoordinates = 0,
170 unsigned int aNumberOfCompontentsPerCoord = 0,
171 int aCoordDataType = 0,
172 const void* apTextureCoordinates = 0,
173 const unsigned int aNumberOfAdditionalData = 0,
174 unsigned int aNumberOfCompontentsPerAdditionalData = 0,
175 int anAdditionalDataType = 0,
176 const void* apAdditionalData = 0) = 0;
189 virtual void setIndexData(
const unsigned int aNumberOfIndexes,
191 const void* apIndexSet) = 0;
197 virtual void display()
const = 0;
unsigned int m_number_of_compontents_per_texture_coord
Number of components per texture coordinate.
virtual VBO & operator=(const VBO &aVbo)
Copy operator.
unsigned int m_opengl_major_version
int m_texture_coordinate_data_type
virtual void setIndexData(const unsigned int aNumberOfIndexes, int anIndexDataType, const void *apIndexSet)=0
Set the index.
unsigned int m_number_of_compontents_per_normal
Number of components per normal.
unsigned int m_number_of_indices
Number of indices.
virtual void destroy()
Release the data on the GPU.
unsigned int m_texture_coordinate_size
Size in bytes of the array of texture coordinates.
unsigned int m_additional_data_size
Size in bytes of the array of additional data.
unsigned int m_id_set[5]
ID of VBOs.
int getPrimitiveType() const
Accessor on the primitive type.
unsigned int m_vertex_size
Size in bytes of the array of vertices.
VBO()
Default constructor.
virtual void display() const =0
Display the triangular mesh using OpenGL.
unsigned int getOpenglMajorVersion() const
Accessor on the major version of OpenGL that was used to create the VBO.
Class to handle vertex buffer objects (VBOs).
unsigned int m_normal_size
Size in bytes of the array of normal vectors.
unsigned int m_number_of_normals
Number of normal vectors.
unsigned int m_number_of_compontents_per_vertex
Number of components per vertex.
unsigned int m_number_of_compontents_per_additional_data
Number of components per additional data.
unsigned int m_number_of_texture_coordinates
Number of texture coordinates.
bool isReady() const
Check if the vertex buffer object is ready.
int m_vertex_data_type
Data type of vertices; valid values are GL_FLOAT and GL_DOUBLE.
unsigned int m_index_size
Size in bytes of the array of indices.
VBO is a class to handle a vertex buffer object (VBO).
int m_additional_data_type
Data type of additional data; valid values are GL_FLOAT and GL_DOUBLE.
int m_normal_data_type
Data type of normal vectors; valid values are GL_FLOAT and GL_DOUBLE.
virtual ~VBO()
Destructor.
void reset()
Reset the data.
int getBufferUsageHint() const
Accessor on the buffer usage hint.
unsigned int m_number_of_additional_data
Number of additional data.
virtual void setVertexData(int aPrimitiveType, const unsigned int aNumberOfVertices=0, unsigned int aNumberOfCompontentsPerVertex=0, int aVertexDataType=0, const void *apVertices=0, const unsigned int aNumberOfNormals=0, unsigned int aNumberOfCompontentsPerNormal=0, int aNormalDataType=0, const void *apNormals=0, const unsigned int aNumberOfTextureCoordinates=0, unsigned int aNumberOfCompontentsPerCoord=0, int aCoordDataType=0, const void *apTextureCoordinates=0, const unsigned int aNumberOfAdditionalData=0, unsigned int aNumberOfCompontentsPerAdditionalData=0, int anAdditionalDataType=0, const void *apAdditionalData=0)=0
Set the vertex data.
unsigned int m_number_of_vertices
Number of vertices.
void setBufferUsageHint(int aFlag)