diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:04:04 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:04:04 -0800 |
| commit | e943f2fd8e7623ba3ea12bb65294d30446db4174 (patch) | |
| tree | eda2f24648d61fb33f3fa754d9fb4b5693517e0c /samples/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java | |
| parent | 5c11852110eeb03dc5a69111354b383f98d15336 (diff) | |
Code drop from //branches/cupcake/...@124589
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.java | 15 |
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); /* |
