Getting ready

The following are the important uniform variables for this example:

  • NumSegments: This is the number of line segments to be produced.
  • NumStrips: This is the number of isolines to be produced. For this example, this should be set to 1.
  • LineColor: This is the color for the resulting line strip.

Set the uniform variables within the main OpenGL application. There are a total of four shaders to be compiled and linked. They are the vertex, fragment, tessellation control, and tessellation evaluation shaders.

Get OpenGL 4 Shading Language Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.