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

panda/src/crgsg/crGeomNodeContext.h

Go to the documentation of this file.
00001 // Filename: chromium.GeomNodeContext.h
00002 // Created by:  drose (12Jun01)
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 #ifndef CRGEOMNODECONTEXT_H
00020 #define CRGEOMNODECONTEXT_H
00021 
00022 #include <pandabase.h>
00023 
00024 #ifdef WIN32_VC
00025 // Must include windows.h before gl.h on NT
00026 #define WIN32_LEAN_AND_MEAN
00027 #include <windows.h>
00028 #undef WIN32_LEAN_AND_MEAN
00029 #endif
00030 
00031 
00032 #include <GL/gl.h>
00033 // Chromium specific
00034 #ifdef WIN32_VC // [
00035 #define WINDOWS 1
00036 #endif //]
00037 #include "cr_glwrapper.h"
00038 #include "cr_applications.h"
00039 #include "cr_spu.h"
00040 extern SPUDispatchTable chromium;
00041 
00042 #include <geomNodeContext.h>
00043 #include <geomNode.h>
00044 #include "pvector.h"
00045 
00046 ////////////////////////////////////////////////////////////////////
00047 //       Class : CRGeomNodeContext
00048 // Description :
00049 ////////////////////////////////////////////////////////////////////
00050 class EXPCL_PANDACR CRGeomNodeContext : public GeomNodeContext {
00051 public:
00052   INLINE CRGeomNodeContext(GeomNode *node);
00053 
00054   // The GL display list index that draws the contents of this
00055   // GeomNode.
00056   GLuint _index;
00057 
00058   // A list of the dynamic Geoms within the GeomNode; these aren't
00059   // part of the above display list.
00060   typedef pvector<PT(dDrawable) > Geoms;
00061   Geoms _dynamic_geoms;
00062 
00063   // The number of vertices represented by the display list.  This is
00064   // strictly for the benefit of PStats reporting.
00065   DO_PSTATS_STUFF(int _num_verts;)
00066 
00067 public:
00068   static TypeHandle get_class_type() {
00069     return _type_handle;
00070   }
00071   static void init_type() {
00072     GeomNodeContext::init_type();
00073     register_type(_type_handle, "CRGeomNodeContext",
00074                   GeomNodeContext::get_class_type());
00075   }
00076   virtual TypeHandle get_type() const {
00077     return get_class_type();
00078   }
00079   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00080 
00081 private:
00082   static TypeHandle _type_handle;
00083 };
00084 
00085 #include "crGeomNodeContext.I"
00086 
00087 #endif
00088 

Generated on Fri May 2 00:35:55 2003 for Panda by doxygen1.3