What proof do you have that it’s not executing your vertex shader? That is, what happens if you take away the attribute usage and rely solely on gl_VertexID?
If I remove the offset, it renders as expected. If I use a uniform offset, it renders as expected. It is only when I use and try to set and read an in attribute with glVertexAttrib it does not work. I could believe it is running, but reading garbage from the in attribute hence translating by some large random vec4 and putting the offset outside the clipping area. The question is why doesn’t the data get grom glVertexAttrib to the in attribute.
[QUOTE=Betrayal;1264513]Do you have by any chance a AMD GPU?
Then try another location != 0. There seems to be a driver bug for some data at location 0.
(And don’t forget to use this locationindex in glVertexAttrib as well)[/QUOTE]
Holy cow. Betrayal for the win! Yes, I have AMD Radeon HD 7900. Location 0 doesn’t work. Changing to layout (location = 1) works. OMG, I’ve been beating my head on that one for hours.
Glad i could help.
I stumpled across this problem (same Superbible code) some time ago and also wasted hours. Found a solution by pure luck and reported it to AMD, but they don’t seem to care.
There is another Problem with AMD Drivers and Sampler Objects, keep this in mind when further reading Superbible 6: