summaryrefslogtreecommitdiffstats
path: root/o3d/samples/manipulators
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-05 01:25:21 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-05 01:25:21 +0000
commit01ee861ca7a7e1655e97197dfc634904710bbe3d (patch)
tree980625a4f88507ebd31aea21cf4749f61610357d /o3d/samples/manipulators
parentbd76fc2bcef23c62e570bdb67d782f4811a5f92d (diff)
downloadchromium_src-01ee861ca7a7e1655e97197dfc634904710bbe3d.zip
chromium_src-01ee861ca7a7e1655e97197dfc634904710bbe3d.tar.gz
chromium_src-01ee861ca7a7e1655e97197dfc634904710bbe3d.tar.bz2
Add obscured / unobscured rendering to
manipulators. I only did it on the rotate1 manipulators because it was easy. On the translate ones you either need to put each shape on it's own transform so you can set the parameters different or you need the materials to use different named parameters. Review URL: http://codereview.chromium.org/463025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33900 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/manipulators')
-rw-r--r--o3d/samples/manipulators/rotate1.html22
-rw-r--r--o3d/samples/manipulators/translate1.html22
-rw-r--r--o3d/samples/manipulators/translate2.html22
3 files changed, 6 insertions, 60 deletions
diff --git a/o3d/samples/manipulators/rotate1.html b/o3d/samples/manipulators/rotate1.html
index 0b418db..7f4f27d 100644
--- a/o3d/samples/manipulators/rotate1.html
+++ b/o3d/samples/manipulators/rotate1.html
@@ -259,31 +259,13 @@ function createManipulators() {
// from the scene's transforms.
var manipulatorRoot = pack.createObject('Transform');
- // Create the render graph for the manipulators view that uses the same
- // DrawContext as the main view.
- var manipulatorViewInfo = o3djs.rendergraph.createView(
+ g_manager = o3djs.manipulators.createManager(
pack,
manipulatorRoot,
g_client.renderGraphRoot,
- undefined, // clearColor
- undefined, // priority
- undefined, // viewport
- undefined, // performanceDrawList
- undefined, // zOrderedDrawList
+ g_mainViewInfo.root.priority + 1,
g_mainViewInfo.drawContext);
- // Make sure the manipulators gets drawn after the scene.
- manipulatorViewInfo.root.priority = g_mainViewInfo.root.priority + 1;
-
- // Turn off clearing the color for the manipulators.
- manipulatorViewInfo.clearBuffer.clearColorFlag = false;
-
- g_manager = o3djs.manipulators.createManager(
- pack,
- manipulatorViewInfo.performanceDrawList,
- manipulatorRoot,
- null,
- 0);
var jj = 2;
for (var ii = 0; ii < g_primitives.length; ii++) {
var manip1 = g_manager.createRotate1();
diff --git a/o3d/samples/manipulators/translate1.html b/o3d/samples/manipulators/translate1.html
index c8eb98e..06c7193 100644
--- a/o3d/samples/manipulators/translate1.html
+++ b/o3d/samples/manipulators/translate1.html
@@ -259,31 +259,13 @@ function createManipulators() {
// from the scene's transforms.
var manipulatorRoot = pack.createObject('Transform');
- // Create the render graph for the manipulators view that uses the same
- // DrawContext as the main view.
- var manipulatorViewInfo = o3djs.rendergraph.createView(
+ g_manager = o3djs.manipulators.createManager(
pack,
manipulatorRoot,
g_client.renderGraphRoot,
- undefined, // clearColor
- undefined, // priority
- undefined, // viewport
- undefined, // performanceDrawList
- undefined, // zOrderedDrawList
+ g_mainViewInfo.root.priority + 1,
g_mainViewInfo.drawContext);
- // Make sure the manipulators gets drawn after the scene.
- manipulatorViewInfo.root.priority = g_mainViewInfo.root.priority + 1;
-
- // Turn off clearing the color for the manipulators.
- manipulatorViewInfo.clearBuffer.clearColorFlag = false;
-
- g_manager = o3djs.manipulators.createManager(
- pack,
- manipulatorViewInfo.performanceDrawList,
- manipulatorRoot,
- null,
- 0);
var jj = 2;
for (var ii = 0; ii < g_primitives.length; ii++) {
var manip = g_manager.createTranslate1();
diff --git a/o3d/samples/manipulators/translate2.html b/o3d/samples/manipulators/translate2.html
index 3946d74..a284f89 100644
--- a/o3d/samples/manipulators/translate2.html
+++ b/o3d/samples/manipulators/translate2.html
@@ -259,31 +259,13 @@ function createManipulators() {
// from the scene's transforms.
var manipulatorRoot = pack.createObject('Transform');
- // Create the render graph for the manipulators view that uses the same
- // DrawContext as the main view.
- var manipulatorViewInfo = o3djs.rendergraph.createView(
+ g_manager = o3djs.manipulators.createManager(
pack,
manipulatorRoot,
g_client.renderGraphRoot,
- undefined, // clearColor
- undefined, // priority
- undefined, // viewport
- undefined, // performanceDrawList
- undefined, // zOrderedDrawList
+ g_mainViewInfo.root.priority + 1,
g_mainViewInfo.drawContext);
- // Make sure the manipulators gets drawn after the scene.
- manipulatorViewInfo.root.priority = g_mainViewInfo.root.priority + 1;
-
- // Turn off clearing the color for the manipulators.
- manipulatorViewInfo.clearBuffer.clearColorFlag = false;
-
- g_manager = o3djs.manipulators.createManager(
- pack,
- manipulatorViewInfo.performanceDrawList,
- manipulatorRoot,
- null,
- 0);
var jj = 2;
for (var ii = 0; ii < g_primitives.length; ii++) {
var manip = g_manager.createTranslate2();