summaryrefslogtreecommitdiff
path: root/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java')
-rw-r--r--samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java
index 587185764..451b927a9 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java
@@ -16,7 +16,6 @@
package com.example.android.apis.graphics;
-import com.example.android.apis.R;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
@@ -24,15 +23,19 @@ import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.ShortBuffer;
+import javax.microedition.khronos.egl.EGL10;
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
+import android.opengl.GLSurfaceView;
import android.opengl.GLU;
import android.opengl.GLUtils;
import android.os.SystemClock;
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.opengles.GL10;
+import com.example.android.apis.R;
public class TriangleRenderer implements GLSurfaceView.Renderer{
@@ -51,7 +54,7 @@ public class TriangleRenderer implements GLSurfaceView.Renderer{
return configSpec;
}
- public void surfaceCreated(GL10 gl) {
+ public void onSurfaceCreated(GL10 gl, EGLConfig config) {
/*
* By default, OpenGL enables features that improve quality
* but reduce performance. One might want to tweak that
@@ -113,7 +116,7 @@ public class TriangleRenderer implements GLSurfaceView.Renderer{
bitmap.recycle();
}
- public void drawFrame(GL10 gl) {
+ public void onDrawFrame(GL10 gl) {
/*
* By default, OpenGL enables features that improve quality
* but reduce performance. One might want to tweak that
@@ -159,7 +162,7 @@ public class TriangleRenderer implements GLSurfaceView.Renderer{
mTriangle.draw(gl);
}
- public void sizeChanged(GL10 gl, int w, int h) {
+ public void onSurfaceChanged(GL10 gl, int w, int h) {
gl.glViewport(0, 0, w, h);
/*