Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Tessellation shader question

  1. #1
    Intern Contributor
    Join Date
    Sep 2012

    Tessellation shader question

    I have coded up a simple core 4.3 program to draw a cubic Bezier curve. The input in the app program is 4 control points, the fineness of the approximating polyline is controlled by a uniform in the TCS which sets gl_TessLevelOuter[1], while the TES defines the polyline via "layout( isolines, equal_spacing ) in".

    So far, so good. The approximating polyline comes out fine. But I want to draw the control points as large points as well. How to do this? The TCS and TES are set up to draw polylines so I have to bypass them (right?). I believe I know one way to do this, which is to create two separate pipelines with help of glBindProgramPipeline() calls.

    But is this the right way to do this thing? Seems a bit of overkill.

    Another incidental question: the latest red book seems to suggest the statement in the TES should be "layout( isolines, equal_spacing ) out" with "out" at the end. This doesn't work for me. I need it to be "in" as in the 1st para above (following Bailey/Cunningham Graphics Shaders). So, is that a bug in the red book?

    Thanks in advance,

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Another incidental question

    I think it is a typo - I use "in" as well.

    The tessilation can only output 1 type of mesh at a time so if you want to draw lines and points you will need 2 shaders and 2 render calls,

  3. #3
    Intern Contributor
    Join Date
    Sep 2012
    Thanks, tonyo_au.
    Separate pipelines it is then.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts