summaryrefslogtreecommitdiffstats
path: root/tests/RenderScriptTests/ShadersTest/src
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2011-12-06 16:48:43 -0800
committerStephen Hines <srhines@google.com>2011-12-06 16:48:43 -0800
commitd53333cc21213274fe6e58c8399249d2e5ae5eb2 (patch)
tree05852d25d7b18486219d5414dc9525ff310b77eb /tests/RenderScriptTests/ShadersTest/src
parent4d322043ab695583a6741924b60c934fd9dc7e3e (diff)
downloadframeworks_base-d53333cc21213274fe6e58c8399249d2e5ae5eb2.zip
frameworks_base-d53333cc21213274fe6e58c8399249d2e5ae5eb2.tar.gz
frameworks_base-d53333cc21213274fe6e58c8399249d2e5ae5eb2.tar.bz2
Remove warnings about unused results.
Change-Id: I53004b4452c5e1ac6ff0dab8430de7f73e8a99b9
Diffstat (limited to 'tests/RenderScriptTests/ShadersTest/src')
-rw-r--r--tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs b/tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs
index 53f10f9..ae32e3a 100644
--- a/tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs
+++ b/tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs
@@ -57,6 +57,14 @@ static float gZoom;
static float gLastX;
static float gLastY;
+static float3 toFloat3(float x, float y, float z) {
+ float3 f;
+ f.x = x;
+ f.y = y;
+ f.z = z;
+ return f;
+}
+
void onActionDown(float x, float y) {
gLastX = x;
gLastY = y;
@@ -112,8 +120,8 @@ void updateMeshInfo() {
rsgMeshComputeBoundingBox(info->mMesh,
&minX, &minY, &minZ,
&maxX, &maxY, &maxZ);
- info->bBoxMin = (minX, minY, minZ);
- info->bBoxMax = (maxX, maxY, maxZ);
+ info->bBoxMin = toFloat3(minX, minY, minZ);
+ info->bBoxMax = toFloat3(maxX, maxY, maxZ);
gLookAt += (info->bBoxMin + info->bBoxMax)*0.5f;
}
gLookAt = gLookAt / (float)size;