summaryrefslogtreecommitdiffstats
path: root/docs/html/training/graphics/opengl/motion.jd
diff options
context:
space:
mode:
authorLuan Nguyen <luann@google.com>2015-01-28 09:30:28 -0800
committerLuan Nguyen <luann@google.com>2015-02-10 09:39:44 -0800
commitc25adda63603827f1799e0995edf286ac46f51f1 (patch)
treef0234b986b7e88727f3be0cea9c212c71220b222 /docs/html/training/graphics/opengl/motion.jd
parent912cacde8619d28ea1d4a3f6ebf30be1c8a5d47a (diff)
downloadframeworks_base-c25adda63603827f1799e0995edf286ac46f51f1.zip
frameworks_base-c25adda63603827f1799e0995edf286ac46f51f1.tar.gz
frameworks_base-c25adda63603827f1799e0995edf286ac46f51f1.tar.bz2
docs: Fix various issues with incorrect code samples.
bug: 15671968 Change-Id: I3219f9c5e492ee95257439d9f284120dadd277ac
Diffstat (limited to 'docs/html/training/graphics/opengl/motion.jd')
-rw-r--r--docs/html/training/graphics/opengl/motion.jd7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/html/training/graphics/opengl/motion.jd b/docs/html/training/graphics/opengl/motion.jd
index fbcdd7f..b026a4a 100644
--- a/docs/html/training/graphics/opengl/motion.jd
+++ b/docs/html/training/graphics/opengl/motion.jd
@@ -45,16 +45,17 @@ to a shape with rotation.</p>
<h2 id="rotate">Rotate a Shape</h2>
-<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
+<p>Rotating a drawing object with OpenGL ES 2.0 is relatively simple. In your renderer, create
+another transformation matrix (a rotation matrix) and then combine it with your projection and
camera view transformation matrices:</p>
<pre>
private float[] mRotationMatrix = new float[16];
public void onDrawFrame(GL10 gl) {
- ...
float[] scratch = new float[16];
+ ...
+
// Create a rotation transformation for the triangle
long time = SystemClock.uptimeMillis() % 4000L;
float angle = 0.090f * ((int) time);