Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/testbed/lod_test.cxx

Go to the documentation of this file.
00001 // Filename: lod_test.cxx
00002 // Created by:  
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include <pandabase.h>
00020 #include <namedNode.h>
00021 
00022 #include <eventHandler.h>
00023 #include <chancfg.h>
00024 #include <textNode.h>
00025 #include <eggLoader.h>
00026 #include <LOD.h>
00027 #include <LODNode.h>
00028 #include <pt_NamedNode.h>
00029 
00030 extern PT_NamedNode render;
00031 extern PT_NamedNode egg_root;
00032 extern EventHandler event_handler;
00033 
00034 extern int framework_main(int argc, char *argv[]);
00035 extern void (*define_keys)(EventHandler&);
00036 
00037 void lod_keys(EventHandler& eh) {
00038 
00039   PT(LODNode) lodnode = new LODNode("lodnode");
00040   new RenderRelation(egg_root, lodnode);
00041 
00042   PT_NamedNode lodnode0 = loader.load_sync("smiley.egg");
00043   new RenderRelation(lodnode, lodnode0);
00044   lodnode->add_switch(10, 0);
00045 
00046   PT_NamedNode lodnode1 = loader.load_sync("frowney.egg");
00047   new RenderRelation(lodnode, lodnode1);
00048   lodnode->add_switch(1000, 10);
00049 }
00050 
00051 int main(int argc, char *argv[]) {
00052   define_keys = &lod_keys;
00053   return framework_main(argc, argv);
00054 }

Generated on Fri May 2 00:44:08 2003 for Panda by doxygen1.3