diff options
author | Alex Sakhartchouk <alexst@google.com> | 2012-01-26 16:29:52 -0800 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2012-01-26 16:29:52 -0800 |
commit | a18d676edefbafc0b745ab98edab8f50b1c81c61 (patch) | |
tree | 5845f0e10e01688f5af94fd4d56b433b0f24ab5d /tests/RenderScriptTests/SceneGraph/src | |
parent | d4cb9c587c23e3c24d928b0ac1a4de5679846f93 (diff) | |
download | frameworks_base-a18d676edefbafc0b745ab98edab8f50b1c81c61.zip frameworks_base-a18d676edefbafc0b745ab98edab8f50b1c81c61.tar.gz frameworks_base-a18d676edefbafc0b745ab98edab8f50b1c81c61.tar.bz2 |
Material name cleanup. Minor refactoring.
Change-Id: I2e0cba9267c61729eefe8bf0d3c29bf0892ba940
Diffstat (limited to 'tests/RenderScriptTests/SceneGraph/src')
4 files changed, 13 insertions, 17 deletions
diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ColladaParser.java b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ColladaParser.java index a0cb56d..d954313 100644 --- a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ColladaParser.java +++ b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ColladaParser.java @@ -181,7 +181,7 @@ public class ColladaParser { Renderable d = new Renderable();
d.setMesh(geoURL, meshIndexName);
- d.setMaterialName(materialName);
+ d.setMaterialName(materialName.substring(1));
d.setName(geoURL);
//Log.v(TAG, "Created drawable geo " + geoURL + " index " + meshIndexName + " material " + materialName);
diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java index 8ddeda7..45d1dfb 100644 --- a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java +++ b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java @@ -244,7 +244,7 @@ public class SceneManager extends SceneGraphBase { mRenderLoop.set_gPFSBackground(ProgramStore.BLEND_NONE_DEPTH_TEST(mRS)); } - public ScriptC_render getRenderLoop() { + public ScriptC getRenderLoop() { return mRenderLoop; } } diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/TestApp.java b/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/TestApp.java index 8b032f7..385a7ab 100644 --- a/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/TestApp.java +++ b/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/TestApp.java @@ -106,8 +106,8 @@ public class TestApp extends Activity { public void loadModel() { Intent intent = new Intent(); intent.setAction(Intent.ACTION_PICK); - intent.setClassName("com.android.scenegraph", - "com.android.scenegraph.FileSelector"); + intent.setClassName("com.android.testapp", + "com.android.testapp.FileSelector"); startActivityForResult(intent, FIND_DAE_MODEL); } diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/TestAppRS.java b/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/TestAppRS.java index 8840d12..e24b1a7 100644 --- a/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/TestAppRS.java +++ b/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/TestAppRS.java @@ -125,8 +125,6 @@ public class TestAppRS { // When a new model file is selected from the UI, this function gets called to init everything void loadModel(String path) { - //String shortName = path.substring(path.lastIndexOf('/') + 1); - //shortName = shortName.substring(0, shortName.lastIndexOf('.')); mLoadingScreen.showLoadingScreen(true); mActiveScene.destroyRS(mSceneManager); mSceneManager.loadModel(path, mLoadedCallback); @@ -245,17 +243,17 @@ public class TestAppRS { mActiveScene.assignRenderStateToMaterial(diffuse, "lambert2$"); - mActiveScene.assignRenderStateToMaterial(paint, "^#Paint"); - mActiveScene.assignRenderStateToMaterial(paint, "^#Carbon"); - mActiveScene.assignRenderStateToMaterial(paint, "^#Glass"); - mActiveScene.assignRenderStateToMaterial(paint, "^#MainGlass"); + mActiveScene.assignRenderStateToMaterial(paint, "^Paint"); + mActiveScene.assignRenderStateToMaterial(paint, "^Carbon"); + mActiveScene.assignRenderStateToMaterial(paint, "^Glass"); + mActiveScene.assignRenderStateToMaterial(paint, "^MainGlass"); - mActiveScene.assignRenderStateToMaterial(aluminum, "^#Metal"); - mActiveScene.assignRenderStateToMaterial(aluminum, "^#Brake"); + mActiveScene.assignRenderStateToMaterial(aluminum, "^Metal"); + mActiveScene.assignRenderStateToMaterial(aluminum, "^Brake"); - mActiveScene.assignRenderStateToMaterial(glassTransp, "^#GlassLight"); + mActiveScene.assignRenderStateToMaterial(glassTransp, "^GlassLight"); - mActiveScene.assignRenderStateToMaterial(lights, "^#LightBlinn"); + mActiveScene.assignRenderStateToMaterial(lights, "^LightBlinn"); Renderable plane = (Renderable)mActiveScene.getRenderableByName("pPlaneShape1"); if (plane != null) { @@ -282,8 +280,6 @@ public class TestAppRS { mDiffCube = new TextureCube("sdcard/scenegraph/", "cube_spec.png"); initPaintShaders(); - ScriptC_render renderLoop = mSceneManager.getRenderLoop(); - - mLoadingScreen.setRenderLoop(renderLoop); + mLoadingScreen.setRenderLoop(mSceneManager.getRenderLoop()); } } |