Panda3D
|
00001 // Filename: drawCullHandler.h 00002 // Created by: drose (25Feb02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef DRAWCULLHANDLER_H 00016 #define DRAWCULLHANDLER_H 00017 00018 #include "pandabase.h" 00019 #include "cullHandler.h" 00020 00021 class GraphicsStateGuardianBase; 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : DrawCullHandler 00025 // Description : This special kind of CullHandler immediately draws 00026 // its contents as soon as it receives them. This draws 00027 // geometry immediately as it is encountered in the 00028 // scene graph by cull, mixing the draw and cull 00029 // traversals into one traversal, and prohibiting state 00030 // sorting. However, it has somewhat lower overhead 00031 // than separating out draw and cull, if state sorting 00032 // and multiprocessing are not required. 00033 //////////////////////////////////////////////////////////////////// 00034 class EXPCL_PANDA_CULL DrawCullHandler : public CullHandler { 00035 public: 00036 INLINE DrawCullHandler(GraphicsStateGuardianBase *gsg); 00037 00038 virtual void record_object(CullableObject *object, 00039 const CullTraverser *traverser); 00040 00041 private: 00042 GraphicsStateGuardianBase *_gsg; 00043 }; 00044 00045 #include "drawCullHandler.I" 00046 00047 #endif 00048 00049 00050