June 2013
Intermediate to advanced
346 pages
8h 42m
English
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:
| AirHockeyTextured/src/com/airhockey/android/util/ShaderHelper.java | |
| | public static int buildProgram(String vertexShaderSource, ... |
Read now
Unlock full access