PDA

View Full Version : Problem about Using VBO , Somebody can help me?



stanlylee
10-16-2006, 11:27 PM
I use VBO and system memory togather in my application.
VBO for TexCoord. and system momery for Pos/Normal/Tangent.
The application works well in the my notebook/FW 84.56 for Nvidia Go.

When I install the modified driver FW 91.47(download from laptopvideo2go , not a offical release.) , the application crashed , driver says "reading exception at the location 0x0000005" .

Anyone known why? thanks.

here is the steps I set up the VBO/Sys memory pointer.


1. Bind VBO.
2. glEnableClientState(texture_coord);
glTexCoordPointer ( offset)
3. Unbind VBO.
4 glEnableClientState(position_array)
glVertexPointer(memory pointer)
... other client state
5. glDrawElements();

6. disable All enabled Client state.

Relic
10-16-2006, 11:51 PM
Well, probably a bug then. But, you should not mix VBO with arrays from system memory or you loose performance.
Read this thread: http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=3;t=014785#000001

stanlylee
10-17-2006, 12:02 AM
Thanks Relic.
I known mix VBO with arrays is not good.
But I just want to known where is the bug(maybe bug is in the modified driver).

here is dumped infomation of GL Call from GLIntercept, at the last line glDrawElement , application crashed.


glActiveTexture(GL_TEXTURE0)
glEnable(GL_TEXTURE_2D)
glActiveTexture(GL_TEXTURE0)
glEnable(GL_CULL_FACE)
glCullFace(GL_BACK)
glFrontFace(GL_CCW)
glEnable(GL_BLEND)
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA)
glEnable(GL_ALPHA_TEST)
glAlphaFunc(GL_GREATER,0.007843)
glBindBuffer(GL_ARRAY_BUFFER,0)
glEnableClientState(GL_VERTEX_ARRAY)
glVertexPointer(3,GL_FLOAT,36,0x62b10e8)
glEnableClientState(GL_NORMAL_ARRAY)
glNormalPointer(GL_FLOAT,36,0x62b10f4)
glBindBuffer(GL_ARRAY_BUFFER,1)
glClientActiveTexture(GL_TEXTURE0)
glEnableClientState(GL_TEXTURE_COORD_ARRAY)
glTexCoordPointer(2,GL_FLOAT,8,0x0000)
glActiveTexture(GL_TEXTURE0)
glEnable(GL_TEXTURE_2D)
glBindTexture(GL_TEXTURE_2D,2)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL _REPEAT)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL _REPEAT)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_LINEAR)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_LINEAR)
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MO DULATE)
glActiveTexture(GL_TEXTURE0)
glMatrixMode(GL_PROJECTION)
glLoadMatrixf()
glMatrixMode(GL_MODELVIEW)
glLoadMatrixf()
glMultMatrixf()
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0)
glDrawElements(GL_TRIANGLES,1746,GL_UNSIGNED_INT,0 x393d748) Textures[ (0,2) ]
glActiveTexture(GL_TEXTURE0)
glEnable(GL_TEXTURE_2D)
glBindTexture(GL_TEXTURE_2D,3)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL _REPEAT)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL _REPEAT)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_LINEAR)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_LINEAR)
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MO DULATE)
glActiveTexture(GL_TEXTURE0)
glMatrixMode(GL_PROJECTION)
glLoadMatrixf()
glMatrixMode(GL_MODELVIEW)
glLoadMatrixf()
glMultMatrixf()
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0)
glDrawElements(GL_TRIANGLES,798,GL_UNSIGNED_INT,0x 3941358) Textures[ (0,3) ]