If I uncomment the vbo binding in init function the vertex arrays aren’t anymore drawn. I don’t understand this because I don’t use them. Maybe its a bug.
Of course you use VBOs when you bind them!
With VBOs you must give byte offsets into bound buffers instead of the address of your vertex data array in system memory. Read the examples in the VBO spec.
Vertex arrays are enabled with glEnableClientState. That it worked with glEnable in your case is due to the legacy GL_EXT_vertex_array extension.
unsigned int buffers[ 4 ];
glGenBuffersARB( 1, buffers );
_vertex_buffer = buffers[ 0 ];
_normal_buffer = buffers[ 1 ];
_texcoord_buffer = buffers[ 2 ];
_index_buffer = buffers[ 3 ];
[/b]
I didn’t read all but here is the first mistake at least: GenBuffers expects the number of buffers to generate for the first argument. You give one and use four. How can you expect that to work properly then ?
If it’s a typo error, then…
If you didn’t already have read the spec, then go and read it. If you did it, then reread it. Another thing would be to read again and again your code if you think you know enough the specs.
Sorry I have changed the code very much because a bug with the xrender extension(two days of constant freeze of the xserver). Original it was 4 and I don’t know why I have changed it. I read the spec long ago and it seems it was to long. I use glEnable for vertex arrays since the irix days. Thank you for the anwsers of my stupid question but two days of crashs have mellow my brain.