Commit ece33c58 authored by Nicolas AUBRY's avatar Nicolas AUBRY

Modification de la classe MapRender pour avoir accès facilement au champs m_indexBuffers et

m_nbIndices
parent ed815783
......@@ -28,6 +28,7 @@
#include <GL/glew.h>
#include <vector>
#include <list>
#include <utility>
#include "Topology/generic/dart.h"
#include "Topology/generic/functor.h"
......@@ -67,7 +68,8 @@ enum bufferIndex
POINT_INDICES = 0,
LINE_INDICES = 1,
TRIANGLE_INDICES = 2,
FLAT_BUFFER = 3
FLAT_BUFFER = 3,
SIZE_BUFFER
} ;
......@@ -78,12 +80,14 @@ protected:
/**
* vbo buffers
*/
GLuint m_indexBuffers[4] ;
GLuint m_indexBuffers[SIZE_BUFFER] ;
/**
* nb indices
*/
GLuint m_nbIndices[4] ;
GLuint m_nbIndices[SIZE_BUFFER] ;
typedef std::pair<GLuint*, unsigned int> buffer_array;
public:
/**
......@@ -101,6 +105,9 @@ public:
*/
~MapRender() ;
buffer_array get_index_buffer() { return std::make_pair(m_indexBuffers, SIZE_BUFFER); }
buffer_array get_nb_index_buffer() { return std::make_pair(m_nbIndices, SIZE_BUFFER); }
protected:
/**
* addition of indices table of one triangle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment