diff options
| author | 2011-12-06 18:33:42 -0800 | |
|---|---|---|
| committer | 2011-12-06 18:33:42 -0800 | |
| commit | bfda435744fc110ba2c6ac070a09394a8608a422 (patch) | |
| tree | 96ac6ab0d56b86abd608c2763887e2f1ccc0b4d6 | |
| parent | f7f930480c75bcb57ae98d4a0fc59a3fb8e90e3d (diff) | |
| parent | d53333cc21213274fe6e58c8399249d2e5ae5eb2 (diff) | |
Merge "Remove warnings about unused results."
| -rw-r--r-- | tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/simplemodel.rs | 12 | ||||
| -rw-r--r-- | tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/simplemodel.rs b/tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/simplemodel.rs index 8cec4095df3d..de2a0a7ff0bd 100644 --- a/tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/simplemodel.rs +++ b/tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/simplemodel.rs @@ -48,6 +48,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; @@ -104,8 +112,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; diff --git a/tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs b/tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs index 53f10f989319..ae32e3a44b4a 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; |