PDA

View Full Version : Vertex attributes array issue



Zengar
04-06-2003, 06:02 AM
I experience a problem with using glVertexAttribPointerARB. I setup my arrays like this:

// initialization
glVertexAttribPointerARB(0, 2, GL_FLOAT, GL_FALSE, 0, data); // data - pointer to array of 2-component vectors

glEnableVertexAttribArrayARB(0); // enable array

//....
//main loop
glClear(...);
glLoadIdentity;

glDrawArrays(GL_TRIANGLES, 0, 3);

// swap buffers etc.


The problem is, I get no output. The screen remains black. The same code works fine if I use conventional GL commands(like glVertexPointer), or if I specify triangles via glVertexAttrib2fARB(0,...

I guess it is either a bug in the driver or I should enable some states. But what states?

BTW, I run GeForce3 Ti 200 with 43.45 drivers

Zengar
04-06-2003, 06:49 AM
Ok, I found it out. When I enable GL_VERTEX_PROGRAM_ARB my program run perfectly. But I think it's somehow funny, when I can use glVertexAttribARB stuff with GL_VERTEX_PROGRAM_ARB disabled, but not the array pointers.

glVertexPointer and glVertexAttribPointerARB(0, ... should be the same call(so far), not depending on vertex program enabled/disabled. It would be very nice if Nvidia driver programmers will take care of this driver bug.