diff options
author | Alex Sakhartchouk <alexst@google.com> | 2010-07-01 16:47:40 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-01 16:47:40 -0700 |
commit | 704aba52a8732ac6fffe9551756f86e76864e0a7 (patch) | |
tree | 20e8d0a291b527ce31dc91dd3a32e32ab69a5ad8 /libs/rs/java/ModelViewer | |
parent | e7f49e0d32cf63505837f5f1eea6607686e50842 (diff) | |
parent | 164aaedf7f24827c3da84acc733325ae985930d6 (diff) | |
download | frameworks_base-704aba52a8732ac6fffe9551756f86e76864e0a7.zip frameworks_base-704aba52a8732ac6fffe9551756f86e76864e0a7.tar.gz frameworks_base-704aba52a8732ac6fffe9551756f86e76864e0a7.tar.bz2 |
Merge "Start of mesh API cleanup. Switched all native code to go through Mesh class. Removed SimpleMesh Added java Mesh class Will need to port all existing code to use java Mesh, then remove java SimpleMesh."
Diffstat (limited to 'libs/rs/java/ModelViewer')
-rw-r--r-- | libs/rs/java/ModelViewer/res/raw/modelviewer.rs | 2 | ||||
-rw-r--r-- | libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc | bin | 6220 -> 6216 bytes | |||
-rw-r--r-- | libs/rs/java/ModelViewer/res/raw/robot.a3d | bin | 144508 -> 144504 bytes | |||
-rw-r--r-- | libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java | 8 | ||||
-rw-r--r-- | libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java | 6 |
5 files changed, 8 insertions, 8 deletions
diff --git a/libs/rs/java/ModelViewer/res/raw/modelviewer.rs b/libs/rs/java/ModelViewer/res/raw/modelviewer.rs index 91194e8..559bf48 100644 --- a/libs/rs/java/ModelViewer/res/raw/modelviewer.rs +++ b/libs/rs/java/ModelViewer/res/raw/modelviewer.rs @@ -62,7 +62,7 @@ int root(int launchID) { rsMatrixRotate(&matrix, gRotate, 0.0f, 1.0f, 0.0f); rsgProgramVertexLoadModelMatrix(&matrix); - rsgDrawSimpleMesh(gTestMesh); + rsgDrawMesh(gTestMesh); color(0.3f, 0.3f, 0.3f, 1.0f); rsgDrawText("Renderscript model test", 30, 695); diff --git a/libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc b/libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc Binary files differindex a64e725..fb85028 100644 --- a/libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc +++ b/libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc diff --git a/libs/rs/java/ModelViewer/res/raw/robot.a3d b/libs/rs/java/ModelViewer/res/raw/robot.a3d Binary files differindex c0c66ae..430fe95 100644 --- a/libs/rs/java/ModelViewer/res/raw/robot.a3d +++ b/libs/rs/java/ModelViewer/res/raw/robot.a3d diff --git a/libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java b/libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java index b6485dc..37eb9c1 100644 --- a/libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java +++ b/libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java @@ -55,7 +55,7 @@ public class ModelViewerRS { private Allocation mGridImage; private Allocation mAllocPV; - private SimpleMesh mMesh; + private Mesh mMesh; private Font mItalic; private Allocation mTextAlloc; @@ -149,15 +149,15 @@ public class ModelViewerRS { FileA3D model = FileA3D.createFromResource(mRS, mRes, R.raw.robot); FileA3D.IndexEntry entry = model.getIndexEntry(0); - if(entry == null || entry.getClassID() != FileA3D.ClassID.SIMPLE_MESH) { + if(entry == null || entry.getClassID() != FileA3D.ClassID.MESH) { Log.e("rs", "could not load model"); } else { - mMesh = (SimpleMesh)entry.getObject(); + mMesh = (Mesh)entry.getObject(); mScript.set_gTestMesh(mMesh); } - mItalic = Font.create(mRS, mRes, "DroidSerif-Italic.ttf", 10); + mItalic = Font.create(mRS, mRes, "DroidSerif-Italic.ttf", 8); mScript.set_gItalic(mItalic); initTextAllocation(); diff --git a/libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java b/libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java index d3a2a29..06c10ab 100644 --- a/libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java +++ b/libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java @@ -60,13 +60,13 @@ public class ScriptC_Modelviewer extends ScriptC { } private final static int mExportVarIdx_gTestMesh = 3; - private SimpleMesh mExportVar_gTestMesh; - public void set_gTestMesh(SimpleMesh v) { + private Mesh mExportVar_gTestMesh; + public void set_gTestMesh(Mesh v) { mExportVar_gTestMesh = v; setVar(mExportVarIdx_gTestMesh, (v == null) ? 0 : v.getID()); } - public SimpleMesh get_gTestMesh() { + public Mesh get_gTestMesh() { return mExportVar_gTestMesh; } |