SimpleGeometryShader contains two examples of Geometry Shader programs. This is part of a set of programs introducing the use of Modern OpenGL, which are intended to accompany a possible second edition of the book 3D Computer Graphics: A mathematical approach with OpenGL, Cambridge University Press, 2003.
The geometry shaders in SimpleGeometryShader take triangles as input, and output triangle strips. One of them shrinks the size of the triangle on the screen. The second geometry shader renders the triangle as three subtriangles making the center of the input triangle white.
There are two new sources: the main C++ program SimpleGeometryShader.cpp,, and the GLSL shader code in the file SimpleGeometryShader.glsl. It also requires the GlShaderMgr routines to read, compile and link the shader programs.
Available for download:Version 0.1 of SimpleGeometryShader, April 30, 2020. Copyrights reserved.