From 70f1d63126a2c6b9cb0be1bf71ea06b06346c8b7 Mon Sep 17 00:00:00 2001 From: Learn OpenGL ES Date: Fri, 13 Jul 2012 11:09:56 -0400 Subject: [PATCH] Minor updates and corrections. --- .../learnopengles/android/lesson4/LessonFourRenderer.java | 3 ++- .../com/learnopengles/android/lesson6/LessonSixRenderer.java | 3 ++- .../learnopengles/android/lesson8/LessonEightActivity.java | 5 ----- .../android/lesson8/LessonEightGLSurfaceView.java | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson4/LessonFourRenderer.java b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson4/LessonFourRenderer.java index 4d6605e..af50f60 100644 --- a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson4/LessonFourRenderer.java +++ b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson4/LessonFourRenderer.java @@ -385,8 +385,9 @@ public void onSurfaceCreated(GL10 glUnused, EGLConfig config) // Enable depth testing GLES20.glEnable(GLES20.GL_DEPTH_TEST); + // The below glEnable() call is a holdover from OpenGL ES 1, and is not needed in OpenGL ES 2. // Enable texture mapping - GLES20.glEnable(GLES20.GL_TEXTURE_2D); + // GLES20.glEnable(GLES20.GL_TEXTURE_2D); // Position the eye in front of the origin. final float eyeX = 0.0f; diff --git a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson6/LessonSixRenderer.java b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson6/LessonSixRenderer.java index 4625eb5..efbbb30 100644 --- a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson6/LessonSixRenderer.java +++ b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson6/LessonSixRenderer.java @@ -391,8 +391,9 @@ public void onSurfaceCreated(GL10 glUnused, EGLConfig config) // Enable depth testing GLES20.glEnable(GLES20.GL_DEPTH_TEST); + // The below glEnable() call is a holdover from OpenGL ES 1, and is not needed in OpenGL ES 2. // Enable texture mapping - GLES20.glEnable(GLES20.GL_TEXTURE_2D); + // GLES20.glEnable(GLES20.GL_TEXTURE_2D); // Position the eye in front of the origin. final float eyeX = 0.0f; diff --git a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson8/LessonEightActivity.java b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson8/LessonEightActivity.java index 2d006f4..bb44620 100644 --- a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson8/LessonEightActivity.java +++ b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson8/LessonEightActivity.java @@ -6,11 +6,6 @@ import android.content.pm.ConfigurationInfo; import android.os.Bundle; import android.util.DisplayMetrics; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.Button; - -import com.learnopengles.android.R; public class LessonEightActivity extends Activity { private LessonEightGLSurfaceView glSurfaceView; diff --git a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson8/LessonEightGLSurfaceView.java b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson8/LessonEightGLSurfaceView.java index 3dd2c7f..44e86c0 100644 --- a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson8/LessonEightGLSurfaceView.java +++ b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson8/LessonEightGLSurfaceView.java @@ -7,7 +7,6 @@ import android.widget.Toast; import com.learnopengles.android.R; -import com.learnopengles.android.lesson8.ErrorHandler.ErrorType; public class LessonEightGLSurfaceView extends GLSurfaceView implements ErrorHandler {