Hi,
i’m trying to visualize a large triangular mesh which is constructed via constrained delaunay triangulation; about 10-12 Million triangles with color information for each vertex.
I first started using display-lists which was no fun at all, too slow and using to much memory (didn’t get it running with mesh sizes over 4M triangles).
With VBOs I’m able to draw about 8.6 Million triangles (using only one Buffer) on a Gforce 8800 (512Mb) and a Gforce 6600 (128Mb). Above this I get an (openGL) “out of memory” error after loading the data to the buffer (currently 435 Mb) with
glGenBuffers(1,m_VBO);
glBindBuffer( GL_ARRAY_BUFFER, m_VBO);
checkForErrors();
glBufferData( GL_ARRAY_BUFFER, m_numberOfPoints*(sizeof(Vert)), vertices, GL_STATIC_DRAW );
Vert is defined as follows
struct Vert{
unsigned char r;
unsigned char g;
unsigned char b;
float x;
float y;
float z;
};
rendering function looks like this
glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );
checkForErrors();
glBindBufferARB(GL_ARRAY_BUFFER, m_VBO );
checkForErrors();
glColorPointer( 3, GL_UNSIGNED_BYTE, sizeof(Vert), (void*)NULL );
glVertexPointer( 3, GL_FLOAT, sizeof(Vert), BUFFER_OFFSET( 3*sizeof(GLubyte) ) );
checkForErrors();
glDrawArrays( GL_TRIANGLES, 0, m_numberOfPoints);
checkForErrors();
glDisableClientState( GL_COLOR_ARRAY );
glDisableClientState( GL_VERTEX_ARRAY );
Splitting to more vbos didn’t help. Again “out of memory”.
If I save the triangulation as vert-Array to hdd and then load it from hdd and directly push it to the video card memory (using one vbo) it works just fine.
So what causes this phenomenon?
Memory fragmentation on video card?
And most of all, what can I do to get rid of this?
I’m using Visual Studio 2005 on WinXP (32Bit) with OpenGL (nvidia sdk 9.5) and glew 1.5.1.
thanks in advance
Daniel.