GL_PATCH and primitive generator misunderstanding


I don’t understand very well how GL_PATCH and the primitive generator are supposed to work.

I am currently manipulating GL_PATCH primitives with 3 vertices. I basically have 1 origin vertex, 1 U-axis vertex and 1 V-axis vertex.

My patches are entirely generated off uniform values, that is, patch vertices are not even used. So I don’t need any actual patch vertex at all. 1 would be sufficient as I need to “declare” the GL_PATCH primitive.

Problem: when I try to only have 1 patch vertex, my code doesn’t work. I can’t understand why, conceptually speaking.

The primitive generator doesn’t use patch vertices, right? I mean, it just generates U,V parametric values (all sitting between 0.0 and 1.0) and calls the evaluation shader with them, right?

Patch vertices are just there for my own convenience, or am I missing something?


What do your shaders look like?

(I’m not actually sure whether one is a valid parameter to GL_PATCH_VERTICES or not. The specs just seem to say that anything less than 0 is invalid.)

Nevermind, I figured it out - this was a bug in my code.
Zero doesn’t work. One unique patch vertex works fine.
Thanks for your reply anyway. I can’t understand why I end up figuring out the problem once I post a message to a forum :frowning: