Greetings, need some help, ideas!
I am working on a project , building 3D pipeline models for the waterworks, it uses opengl, freeglut , glew. It is working excelent on many
computers including mine, have tested on older 32 bit XPs , 64 bit win 7s, but recently I came across a problem on some other. I didnt want to install visual studio 2008 on the problematic systems yet, but need a solution or advise.
Problem: The program starts and crashes when the pipelines are binded to the VBO.
(Since the number of pipes are up to 50000 , I use vertex arrays - one vertex array contains twohundred pipes , meaning few thousend vertices each. Generaly I have few dozen of the arrays depending on the total count of pipes to be drawn. I found out, this is the fastest way to use vertex arrays if you want to replace individual pipe positions some time)
I managed to find this problem with placing MessageBox stops into the code, and at the first rendering it crashes here, marked behind
the // comment sign:
void PPipelines::Render(){
.
.
.
if (vboVerticesID>0 )glDeleteBuffers(1,&vboVerticesID);
if (vboNormalsID>0 )glDeleteBuffers(1,&vboNormalsID);
if (vboColorsID>0 )glDeleteBuffers(1,&vboColorsID);
glGenBuffers(1, &vboVerticesID); glBindBuffer( GL_ARRAY_BUFFER, vboVerticesID); // Crash here !!! glBufferData( GL_ARRAY_BUFFER, vertices_vbo.size()*sizeof(GL_FLOAT), &vertices_vbo[0], GL_STATIC_DRAW); glBindBuffer( GL_ARRAY_BUFFER, 0); // Bind The Buffer
.
.
}
[ATTACH=CONFIG]290[/ATTACH]
The problem arrises on the binding, now I have placed a safety line behind the calls:
g_fVBOSupported = IsExtensionSupported( “GL_ARB_vertex_buffer_object” );
and showed clearly the problem. When the crash appeared on some machines g_fVBOSupported was always false.
This means that the crash appeared obviosly because of the lack of VBO support.
And here is the paradox thing:
Test machine had an older but fair HD 2600 Radeon (supporting OGL 3.1) , 32 bit Windows XP and Win7 installed
-
GL_ARB_vertex_buffer_object is defined in OpenGl 2.0
-
The program was running excelent having XP in background.
-
Program crashed under win7, g_fVBOSupported returned false.
So the question remains, why it fails on win7. I tried reinstalling drivers, didnt help. What can I do to fix this ?