PDA

View Full Version : vertex shader not running on all vertices



driver
03-14-2014, 09:09 AM
Hi

I have a vertex shader that reads in a buffer of vertices (buffer bound to a vertex array).



/*enabling program goes here*/
glBindVertexArray(id);
glDrawArraysInstanced(GL_POINTS, 0, numpoints, 1);
glBindVertexArray(0);
/*disabling program code goes here*/


However, the vertex shader only produces output for the first 2 vertices.
I have checked the buffer bound to vertex array. It has the required 50 vertices that the vertex shader should run on.

The program writes out to a buffer which is how i know what output i got. This output buffer has more than enough space, so I know that is not because my output buffer is short.

Is there a way i can verify that the vertex shader ran on all the vertices? Could there be anything else wrong (hoping someone has experiences to share) that I am not testing?

thanks!

driver
03-14-2014, 12:53 PM
Note that the output buffer is sent in to the shader program by address , not by buffer object bending/name.



glGetBufferParameterui64vNV(...)
glMakeBufferResidentNV(...)

I don't think that this approach has anything to do with the vertices not being visited since at least two are written out.