diff options
author | Scott Main <smain@google.com> | 2013-08-02 22:27:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-02 22:27:14 +0000 |
commit | 9a0087f22754de40cd5be2a738600f9642a611cc (patch) | |
tree | b03f399a5f888c1ec3f2d7fc5d4c66628c97d21d /docs/html | |
parent | 1f19690322523d5a28051c55353735513638ca39 (diff) | |
parent | ab1f29d935de89077cdf4bfa5cfafe55dd02ea2c (diff) | |
download | frameworks_base-9a0087f22754de40cd5be2a738600f9642a611cc.zip frameworks_base-9a0087f22754de40cd5be2a738600f9642a611cc.tar.gz frameworks_base-9a0087f22754de40cd5be2a738600f9642a611cc.tar.bz2 |
Merge "docs: OpenGL Training sample code fixes" into jb-mr2-docs
Diffstat (limited to 'docs/html')
-rw-r--r-- | docs/html/training/graphics/opengl/motion.jd | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/html/training/graphics/opengl/motion.jd b/docs/html/training/graphics/opengl/motion.jd index 6888235..af70de0 100644 --- a/docs/html/training/graphics/opengl/motion.jd +++ b/docs/html/training/graphics/opengl/motion.jd @@ -47,7 +47,7 @@ to a shape with rotation.</p> <p>Rotating a drawing object with OpenGL ES 2.0 is relatively simple. You create another transformation matrix (a rotation matrix) and then combine it with your projection and -camera view tranformation matrices:</p> +camera view transformation matrices:</p> <pre> private float[] mRotationMatrix = new float[16]; @@ -56,7 +56,7 @@ public void onDrawFrame(GL10 gl) { // Create a rotation transformation for the triangle long time = SystemClock.uptimeMillis() % 4000L; float angle = 0.090f * ((int) time); - Matrix.setRotateM(mRotationMatrix, 0, mAngle, 0, 0, -1.0f); + Matrix.setRotateM(mRotationMatrix, 0, angle, 0, 0, -1.0f); // Combine the rotation matrix with the projection and camera view Matrix.multiplyMM(mMVPMatrix, 0, mRotationMatrix, 0, mMVPMatrix, 0); @@ -67,7 +67,7 @@ public void onDrawFrame(GL10 gl) { </pre> <p>If your triangle does not rotate after making these changes, make sure you have commented out the -{@link android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY GLSurfaceView.RENDERMODE_WHEN_DIRTY} +{@link android.opengl.GLSurfaceView#RENDERMODE_WHEN_DIRTY GLSurfaceView.RENDERMODE_WHEN_DIRTY} setting, as described in the next section.</p> |