In this section, we’ll create one class for our texture shader program and another for our color shader program; we’ll use the texture shader program to draw the table and use the color shader program to draw the mallets. We’ll also create a base class for common functionality. We don’t have to worry about the line anymore now that it’s part of the texture.
Let’s start out by adding a helper function to ShaderHelper. Open up that class, and add the following method to the end:
public static int buildProgram(String vertexShaderSource, ...