Graphics Programs Reference
In-Depth Information
GLES20.glClearColor(0.0f, 0.0f, 1.0f, 1);
Log.d("onSurfaceCreated","invoked");
}
public void onSurfaceChanged(GL10 gl, int width, int
height) {
GLES20.glViewport(0, 0, width, height);
Log.d("onSurfaceChanged","invoked");
}
public void onDrawFrame(GL10 gl) {
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT |
GLES20.GL_DEPTH_BUFFER_BIT);
Log.d("onDrawFrame","invoked");
}
}
When you run this application on your Android device, you see an OpenGL surface
( Figure 3-2 ) like the one we created in Chapter 1 . If you change your device's orient-
ation, the OpenGL surface rearranges itself to fit the new orientation.
 
Search WWH ::




Custom Search