Graphics Programs Reference
In-Depth Information
Figure 1-19
.
Auto-generated methods for GLES20Renderer class
These warnings are indicated for unused imports in
Main.java
file. Quick fix
these warnings if you are on Eclipse. Finally, replace the class
GLES20Renderer
with the code given in
Listing 1-4
. You will see an error after replacing the
code—“GLES20 cannot be resolved to a variable.” This error is caused because the
class
android.opengl.GLES20
is not imported yet. So, import it.
Listing
1-4.
GL SURFACE/src/com/apress/android/glsurface/GLES20Render-
er.java
public class GLES20Renderer implements Renderer {
public void onSurfaceCreated(GL10 gl, EGLConfig
config) {
GLES20.glClearColor(0.0f, 0.0f, 1.0f, 1);
}
Search WWH ::
Custom Search