Skip to content

Commit

Permalink
Color update for Lesson 5.
Browse files Browse the repository at this point in the history
Changed the position of the colors to follow the RGB model. This seems to eliminate the linear interpolation artifacts that were visible earlier.
  • Loading branch information
learnopengles committed Oct 2, 2011
1 parent fe91976 commit 5c95e5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion android/AndroidOpenGLESLessons/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.learnopengles.android"
android:versionCode="5" android:versionName="1.0.4">
android:versionCode="6" android:versionName="1.0.4.1">
<uses-sdk
android:minSdkVersion="8" />
<!-- We require OpenGL ES 2.0 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5c95e5e

Please sign in to comment.