We’ll also need to update our color shader. We defined our puck and mallet with a per-vertex position but not with a per-vertex color. Instead we’ll have to pass in the color as a uniform. The first thing we’ll do to make these changes is add a new constant to ShaderProgram:
protected static final String U_COLOR = "u_Color";
The next step is to update ColorShaderProgram. Go ahead and remove all references to aColorLocation, including getColorAttributeLocation, and then add the following uniform location definition:
private final int uColorLocation; ...