PDA

View Full Version : ATI: procedural drawing without any vertex data



sleap
11-10-2013, 05:44 AM
I'm trying to draw (glDrawArrays) without binding any vertex data, generating everything using glVertex_ID. This works absolutely fine on Nvidia cards, but not with my ATI 5850s. Nothing is drawn unless I glEnableClientState or glEnableVertexAttribArray and bind a buffer full of junk. Can anyone with a different ATI card verify this?

Aurelien
11-10-2013, 09:07 AM
Hi,

I've try to do this, but I didn't work and some NVidia cards, but only with some drivers versions (all recent).

I've made tests with about 5 cards and 3 drivers, but I was not able to identify the problem, so now my strategy is "this should work, but it doesn't everytime, everywhere".

So I gave up, and now I always bind at least a minimal float array filled with dummy data. The other option is to use drawInstanced and gl_InstanceId instead of gl_VertexId.

GClements
11-11-2013, 05:51 AM
I've had similar experiences. However, you can reduce the size of the array by using glVertexAttribDivisor() so that you only need one element per instance rather than per vertex.

My suspicion is that this issue is related to attribute zero being "special" in the compatibility profile: glVertexAttrib(0,...) causes a new vertex to be generated, just like with glVertex().