From cfbd4eff9f972eecaf718e9630f30908a4707c72 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 4 Aug 2001 19:52:02 +0000 Subject: [PATCH] remove NodeAttribute, etc. --- pandaapp/src/stitchviewer/stitchImageVisualizer.cxx | 11 +++++------ pandaapp/src/stitchviewer/stitchImageVisualizer.h | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pandaapp/src/stitchviewer/stitchImageVisualizer.cxx b/pandaapp/src/stitchviewer/stitchImageVisualizer.cxx index cd1f759c7c..9ddc963e3c 100644 --- a/pandaapp/src/stitchviewer/stitchImageVisualizer.cxx +++ b/pandaapp/src/stitchviewer/stitchImageVisualizer.cxx @@ -35,10 +35,8 @@ #include #include #include -#include #include #include -#include #include #include @@ -196,7 +194,9 @@ setup() { << "' graphics pipe." << endl; // Create the render node + _render_top = new NamedNode("render_top"); _render = new NamedNode("render"); + _render_arc = new RenderRelation(_render_top, _render); ChanConfig chanConfig(_main_pipe, chan_cfg, _render, override); _main_win = chanConfig.get_win(); @@ -214,9 +214,8 @@ setup() { NodeRelation *cam_trans = new RenderRelation(_render, cameras); // Turn on backface culling. - CullFaceAttribute *cfa = new CullFaceAttribute; - cfa->set_mode(CullFaceProperty::M_cull_clockwise); - _initial_state.set_attribute(CullFaceTransition::get_class_type(), cfa); + CullFaceTransition *cfa = new CullFaceTransition(CullFaceProperty::M_cull_clockwise); + _render_arc->set_transition(cfa); // Create the data graph root. _data_root = new NamedNode( "data" ); @@ -351,7 +350,7 @@ draw(bool) { int num_windows = _main_pipe->get_num_windows(); for (int w = 0; w < num_windows; w++) { GraphicsWindow *win = _main_pipe->get_window(w); - win->get_gsg()->render_frame(_initial_state); + win->get_gsg()->render_frame(); } ClockObject::get_global_clock()->tick(); } diff --git a/pandaapp/src/stitchviewer/stitchImageVisualizer.h b/pandaapp/src/stitchviewer/stitchImageVisualizer.h index 622b81fc0f..215138f646 100644 --- a/pandaapp/src/stitchviewer/stitchImageVisualizer.h +++ b/pandaapp/src/stitchviewer/stitchImageVisualizer.h @@ -84,8 +84,9 @@ protected: PT(GraphicsPipe) _main_pipe; PT(GraphicsWindow) _main_win; - NodeAttributes _initial_state; + PT(NamedNode) _render_top; PT(NamedNode) _render; + NodeRelation *_render_arc; PT(NamedNode) _data_root; PT(MouseAndKeyboard) _mak; PT(Trackball) _trackball;