Browse Source

temporary fixes to fix compiler issues

David Rose 16 years ago
parent
commit
36dbe8c093

+ 4 - 0
panda/src/pgraphnodes/lightLensNode.I

@@ -61,10 +61,14 @@ set_shadow_caster(bool caster, int buffer_xsize, int buffer_ysize, int buffer_so
   _sb_xsize = buffer_xsize;
   _sb_xsize = buffer_xsize;
   _sb_ysize = buffer_ysize;
   _sb_ysize = buffer_ysize;
   if (buffer_sort != _sb_sort) {
   if (buffer_sort != _sb_sort) {
+    // drose: Temporarily commenting out--can't call set_sort() on an
+    // undefined class.
+    /*
     ShadowBuffers::iterator it;
     ShadowBuffers::iterator it;
     for(it = _sbuffers.begin(); it != _sbuffers.end(); ++it) {
     for(it = _sbuffers.begin(); it != _sbuffers.end(); ++it) {
       it->second->set_sort(buffer_sort);
       it->second->set_sort(buffer_sort);
     }
     }
+    */
     _sb_sort = buffer_sort;
     _sb_sort = buffer_sort;
   }
   }
   set_active(caster);
   set_active(caster);

+ 4 - 1
panda/src/pgraphnodes/lightLensNode.cxx

@@ -17,7 +17,6 @@
 #include "bamReader.h"
 #include "bamReader.h"
 #include "datagram.h"
 #include "datagram.h"
 #include "datagramIterator.h"
 #include "datagramIterator.h"
-#include "graphicsEngine.h"
 
 
 TypeHandle LightLensNode::_type_handle;
 TypeHandle LightLensNode::_type_handle;
 
 
@@ -76,9 +75,13 @@ LightLensNode(const LightLensNode &copy) :
 void LightLensNode::
 void LightLensNode::
 clear_shadow_buffers() {
 clear_shadow_buffers() {
   ShadowBuffers::iterator it;
   ShadowBuffers::iterator it;
+  // drose: Temporarily commenting out--can't call get_engine() or
+  // remove_window() on an undefined class.
+  /*
   for(it = _sbuffers.begin(); it != _sbuffers.end(); ++it) {
   for(it = _sbuffers.begin(); it != _sbuffers.end(); ++it) {
     it->first->get_engine()->remove_window(it->second);
     it->first->get_engine()->remove_window(it->second);
   }
   }
+  */
   _sbuffers.clear();
   _sbuffers.clear();
 }
 }
 
 

+ 7 - 3
panda/src/pgraphnodes/lightLensNode.h

@@ -19,8 +19,8 @@
 
 
 #include "light.h"
 #include "light.h"
 #include "camera.h"
 #include "camera.h"
-#include "graphicsStateGuardian.h"
-#include "graphicsOutput.h"
+#include "graphicsStateGuardianBase.h"
+#include "typedWritableReferenceCount.h"
 
 
 class ShaderGenerator;
 class ShaderGenerator;
 
 
@@ -48,7 +48,11 @@ protected:
   bool _shadow_caster;
   bool _shadow_caster;
   int _sb_xsize, _sb_ysize, _sb_sort;
   int _sb_xsize, _sb_ysize, _sb_sort;
   double _push_bias;
   double _push_bias;
-  typedef pmap<CPT(GraphicsStateGuardian), PT(GraphicsOutput) > ShadowBuffers;
+
+  // drose: This is really a map of GSG -> GraphicsOutput.
+  // Temporarily changed it to TypedWritableReferenceCount to allow
+  // compilation without circular dependencies.
+  typedef pmap<CPT(GraphicsStateGuardianBase), PT(TypedWritableReferenceCount) > ShadowBuffers;
   ShadowBuffers _sbuffers;
   ShadowBuffers _sbuffers;
 
 
 public:
 public: