From 5c95e5eb5c91a358621ba13c6e1e8d2a220656f6 Mon Sep 17 00:00:00 2001 From: Learn OpenGL ES Date: Sun, 2 Oct 2011 18:41:51 -0400 Subject: [PATCH] Color update for Lesson 5. Changed the position of the colors to follow the RGB model. This seems to eliminate the linear interpolation artifacts that were visible earlier. --- android/AndroidOpenGLESLessons/AndroidManifest.xml | 2 +- .../android/lesson5/LessonFiveRenderer.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/AndroidOpenGLESLessons/AndroidManifest.xml b/android/AndroidOpenGLESLessons/AndroidManifest.xml index b16f886..6abb642 100644 --- a/android/AndroidOpenGLESLessons/AndroidManifest.xml +++ b/android/AndroidOpenGLESLessons/AndroidManifest.xml @@ -2,7 +2,7 @@ + android:versionCode="6" android:versionName="1.0.4.1"> diff --git a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson5/LessonFiveRenderer.java b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson5/LessonFiveRenderer.java index 0c4a3dd..d2f57d5 100644 --- a/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson5/LessonFiveRenderer.java +++ b/android/AndroidOpenGLESLessons/src/com/learnopengles/android/lesson5/LessonFiveRenderer.java @@ -99,13 +99,13 @@ public LessonFiveRenderer(final Context activityContext) // Points of the cube: color information // R, G, B, A final float[] p1c = {1.0f, 0.0f, 0.0f, 1.0f}; // red - final float[] p2c = {0.0f, 1.0f, 0.0f, 1.0f}; // green - final float[] p3c = {0.0f, 0.0f, 1.0f, 1.0f}; // blue - final float[] p4c = {0.33f, 0.33f, 0.33f, 1.0f}; // dark gray + final float[] p2c = {1.0f, 0.0f, 1.0f, 1.0f}; // magenta + final float[] p3c = {0.0f, 0.0f, 0.0f, 1.0f}; // black + final float[] p4c = {0.0f, 0.0f, 1.0f, 1.0f}; // blue final float[] p5c = {1.0f, 1.0f, 0.0f, 1.0f}; // yellow - final float[] p6c = {0.0f, 1.0f, 1.0f, 1.0f}; // cyan - final float[] p7c = {1.0f, 0.0f, 1.0f, 1.0f}; // magenta - final float[] p8c = {0.0f, 0.0f, 0.0f, 1.0f}; // black + final float[] p6c = {1.0f, 1.0f, 1.0f, 1.0f}; // white + final float[] p7c = {0.0f, 1.0f, 0.0f, 1.0f}; // green + final float[] p8c = {0.0f, 1.0f, 1.0f, 1.0f}; // cyan final float[] cubeColorData = ShapeBuilder.generateCubeData(p1c, p2c, p3c, p4c, p5c, p6c, p7c, p8c, p1c.length);