Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error from GLSL Geometry shader #29

Closed
wrightwriter opened this issue Mar 25, 2021 · 1 comment
Closed

Parse error from GLSL Geometry shader #29

wrightwriter opened this issue Mar 25, 2021 · 1 comment

Comments

@wrightwriter
Copy link

wrightwriter commented Mar 25, 2021

Related: GLSL Compute shader throws same error #22

Passthrough compute shade:

#version 330

layout(triangles) in;
layout(triangle_strip, max_vertices = 3) out;

void main() {
  for(int i = 0; i < 3; i++) { 
    gl_Position = gl_in[i].gl_Position;
    EmitVertex();
  }
  EndPrimitive();
}

results in:

Parse error: Error in triGeometry_g.geom: Ln: 3 Col: 21
layout(triangles) in;
^
Expecting: Type qualifier, identifier, 'layout' or 'struct'

@laurentlb
Copy link
Owner

Workaround: add verbatim markers.

//[
layout(triangles) in;
layout(triangle_strip, max_vertices = 3) out;
//]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants