1 Reply Latest reply on Aug 29, 2011 1:49 PM by sanosuke001

    lines_adjacency in Geometry Shader issue

      using line_adjacency in geometry shader causes GL_INVALID_OPERATION error



      I'm trying to implement a Bezier Curve algorithm in a geometry shader and so far, not working too well. My problem is that nothing was drawing at all so I tried to simplify the test to see where things were broken. I changed my input layout to lines and it would draw just fine but with lines_adjacency, if I check the gl error, I get a GL_INVALID_OPERATION. Here's my geometry shader


      #version 150

      precision highp float;

      uniform float FpNum;
      uniform mat4 projectionMatrix;
      uniform mat4 viewMatrix;
      uniform mat4 modelMatrix;

      in vec4 colorGeom[];

      smooth out vec4 colorFrag;

      layout(lines_adjacency) in;
      layout(points, max_vertices=4) out;

      void main()
          mat4 mvpMatrix = projectionMatrix * viewMatrix * modelMatrix;
          for(int j = 0; j < gl_in.length(); j++) {
              gl_Position = mvpMatrix * gl_in[j].gl_Position;
              colorFrag = colorGeom


      EDIT: stupid [] not accepting i as it wants to italicize everything; is there a code block? [code/] didn't work...