A vertex shader processes each vertex of drawing objects and can change their built-in attributes such as position, color, normal, and can also change any custom attributes. Here, we consider the example of the vertex shader that just moves vertices according to a rule with the help of parameters that are controlled by the mouse position.
This is example
This example is based on the example given in the The triangles cloud example section of Chapter 2, Drawing in 3D. The original example draws a rotated sphere-shaped cloud of random triangles.
bin/data folder, create a new text file
shaderVert.c containing the following code:
#version 120 #extension GL_ARB_texture_rectangle ...