<div dir="ltr">On 5 September 2013 17:52, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">On Wed, Aug 28, 2013 at 1:59 PM, Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> wrote:<br>
> +[vertex shader]<br>
> +#version 150<br>
<br>
</div>We don't need to specify the #version anymore, now that it's added by<br>
shader_runner, given the [require] section.<br></blockquote><div><br></div><div>Argh, you're right.  I keep forgetting about that.  Fixed.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im"><br>
> +<br>
> +in vec4 vertex;<br>
> +out vec4 vertex_to_gs;<br>
> +<br>
> +void main()<br>
> +{<br>
> +  vertex_to_gs = vertex;<br>
> +}<br>
> +<br>
> +[geometry shader]<br>
> +#version 150<br>
> +<br>
> +layout(triangles_adjacency) in;<br>
> +layout(triangle_strip, max_vertices = 3) out;<br>
> +<br>
> +in vec4 vertex_to_gs[6];<br>
> +<br>
> +void main()<br>
> +{<br>
> +  for (int i = 0; i < 3; i++) {<br>
> +    gl_Position = vertex_to_gs[2*i];<br>
<br>
</div>If I understand correctly, in the first geometry shader invocation<br>
this will emit vertices 1, 3, and 5 from your picture. Is that what<br>
you're referring to when you say "the first triangle is clockwise"?<br>
<br>
I wasn't clear whether you meant the triangle 1-2-3, or 1-3-5. From<br>
the comment and picture I'd have thought the first, and from the code<br>
I'd have thought the second. Both, as it turn out are clockwise.<br></blockquote><div><br></div><div>Your understanding from the code is correct.  Triangle 1-2-3's orientation isn't really significant for this particular test, since it is an "adjacent triangle".  The vertices comprising the adjacent triangles are tested adequately by triangle-strip-adj.shader_test.<br>
<br>I've updated the comment to look like this:<br><br># Note that the only triangles drawn by this test are triangles 1-3-5,<br># 5-3-7, 5-7-9, and 9-7-11.  The other triangles shown in the diagram<br># are "adjacent triangles".<br>
#<br># Note also that triangles 1-3-5, 5-3-7, 5-7-9, and 9-7-11 are all<br># clockwise, so we expect gl_FrontFacing to be false.<br><br></div><div>Is that clear enough, or should I explain in more detail?<br></div><div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Once I understand that,<br>
<br>
Reviewed-by: Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>><br>
</blockquote></div><br></div></div>