瀏覽代碼

Fix couple of circular dependencies, eliminate ShaderGeneratorBase

rdb 16 年之前
父節點
當前提交
4e067a74c1

+ 1 - 0
panda/src/gsgbase/graphicsStateGuardianBase.h

@@ -122,6 +122,7 @@ PUBLISHED:
   virtual bool get_supports_multisample() const=0;
   virtual bool get_supports_multisample() const=0;
   virtual int get_supported_geom_rendering() const=0;
   virtual int get_supported_geom_rendering() const=0;
   virtual bool get_supports_occlusion_query() const=0;
   virtual bool get_supports_occlusion_query() const=0;
+  virtual bool get_supports_shadow_filter() const=0;
 
 
 public:
 public:
   // These are some general interface functions; they're defined here
   // These are some general interface functions; they're defined here

+ 0 - 3
panda/src/pgraph/Sources.pp

@@ -99,7 +99,6 @@
     scissorEffect.I scissorEffect.h \
     scissorEffect.I scissorEffect.h \
     shadeModelAttrib.I shadeModelAttrib.h \
     shadeModelAttrib.I shadeModelAttrib.h \
     shaderAttrib.I shaderAttrib.h \
     shaderAttrib.I shaderAttrib.h \
-    shaderGeneratorBase.I shaderGeneratorBase.h \
     shaderInput.I shaderInput.h \
     shaderInput.I shaderInput.h \
     shaderPool.I shaderPool.h \
     shaderPool.I shaderPool.h \
     showBoundsEffect.I showBoundsEffect.h \
     showBoundsEffect.I showBoundsEffect.h \
@@ -202,7 +201,6 @@
     scissorEffect.cxx \
     scissorEffect.cxx \
     shadeModelAttrib.cxx \
     shadeModelAttrib.cxx \
     shaderAttrib.cxx \
     shaderAttrib.cxx \
-    shaderGeneratorBase.cxx \
     shaderInput.cxx \
     shaderInput.cxx \
     shaderPool.cxx \
     shaderPool.cxx \
     showBoundsEffect.cxx \
     showBoundsEffect.cxx \
@@ -303,7 +301,6 @@
     scissorEffect.I scissorEffect.h \
     scissorEffect.I scissorEffect.h \
     shadeModelAttrib.I shadeModelAttrib.h \
     shadeModelAttrib.I shadeModelAttrib.h \
     shaderAttrib.I shaderAttrib.h \
     shaderAttrib.I shaderAttrib.h \
-    shaderGeneratorBase.I shaderGeneratorBase.h \
     shaderInput.I shaderInput.h \
     shaderInput.I shaderInput.h \
     shaderPool.I shaderPool.h \
     shaderPool.I shaderPool.h \
     showBoundsEffect.I showBoundsEffect.h \
     showBoundsEffect.I showBoundsEffect.h \

+ 0 - 2
panda/src/pgraph/config_pgraph.cxx

@@ -89,7 +89,6 @@
 #include "transformState.h"
 #include "transformState.h"
 #include "transparencyAttrib.h"
 #include "transparencyAttrib.h"
 #include "nodePathLerps.h"
 #include "nodePathLerps.h"
-#include "shaderGeneratorBase.h"
 
 
 #include "dconfig.h"
 #include "dconfig.h"
 
 
@@ -477,7 +476,6 @@ init_libpgraph() {
   ShadeModelAttrib::init_type();
   ShadeModelAttrib::init_type();
   ShaderInput::init_type();
   ShaderInput::init_type();
   ShaderAttrib::init_type();
   ShaderAttrib::init_type();
-  ShaderGeneratorBase::init_type();
   ShowBoundsEffect::init_type();
   ShowBoundsEffect::init_type();
   StateMunger::init_type();
   StateMunger::init_type();
   StencilAttrib::init_type();
   StencilAttrib::init_type();

+ 0 - 1
panda/src/pgraph/pgraph_composite4.cxx

@@ -13,7 +13,6 @@
 #include "shaderInput.cxx"
 #include "shaderInput.cxx"
 #include "shaderAttrib.cxx"
 #include "shaderAttrib.cxx"
 #include "shaderPool.cxx"
 #include "shaderPool.cxx"
-#include "shaderGeneratorBase.cxx"
 #include "showBoundsEffect.cxx"
 #include "showBoundsEffect.cxx"
 #include "stateMunger.cxx"
 #include "stateMunger.cxx"
 #include "stencilAttrib.cxx"
 #include "stencilAttrib.cxx"

+ 0 - 1
panda/src/pgraph/renderState.cxx

@@ -35,7 +35,6 @@
 #include "lightReMutexHolder.h"
 #include "lightReMutexHolder.h"
 #include "lightMutexHolder.h"
 #include "lightMutexHolder.h"
 #include "thread.h"
 #include "thread.h"
-#include "shaderGeneratorBase.h"
 #include "renderAttribRegistry.h"
 #include "renderAttribRegistry.h"
 #include "py_panda.h"
 #include "py_panda.h"
   
   

+ 1 - 2
panda/src/pgraphnodes/shaderGenerator.cxx

@@ -34,7 +34,6 @@
 #include "pointLight.h"
 #include "pointLight.h"
 #include "spotlight.h"
 #include "spotlight.h"
 #include "lightLensNode.h"
 #include "lightLensNode.h"
-#include "graphicsEngine.h"
 #include "lvector4.h"
 #include "lvector4.h"
 
 
 TypeHandle ShaderGenerator::_type_handle;
 TypeHandle ShaderGenerator::_type_handle;
@@ -48,7 +47,7 @@ TypeHandle ShaderGenerator::_type_handle;
 //               which the shader generator belongs.
 //               which the shader generator belongs.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 ShaderGenerator::
 ShaderGenerator::
-ShaderGenerator(PT(GraphicsStateGuardian) gsg, PT(GraphicsOutput) host) :
+ShaderGenerator(PT(GraphicsStateGuardianBase) gsg, PT(GraphicsOutputBase) host) :
   _gsg (gsg), _host (host) {
   _gsg (gsg), _host (host) {
 }
 }
 
 

+ 5 - 6
panda/src/pgraphnodes/shaderGenerator.h

@@ -16,9 +16,8 @@
 #define SHADERGENERATOR_H
 #define SHADERGENERATOR_H
 
 
 #include "pandabase.h"
 #include "pandabase.h"
-#include "graphicsStateGuardian.h"
-#include "graphicsWindow.h"
-#include "shaderGeneratorBase.h"
+#include "graphicsStateGuardianBase.h"
+#include "graphicsOutputBase.h"
 #include "nodePath.h"
 #include "nodePath.h"
 
 
 class AmbientLight;
 class AmbientLight;
@@ -64,7 +63,7 @@ class ShaderAttrib;
 
 
 class EXPCL_PANDA_PGRAPHNODES ShaderGenerator : public TypedObject {
 class EXPCL_PANDA_PGRAPHNODES ShaderGenerator : public TypedObject {
 PUBLISHED:
 PUBLISHED:
-  ShaderGenerator(PT(GraphicsStateGuardian) gsg, PT(GraphicsOutput) host);
+  ShaderGenerator(PT(GraphicsStateGuardianBase) gsg, PT(GraphicsOutputBase) host);
   virtual ~ShaderGenerator();
   virtual ~ShaderGenerator();
   virtual CPT(RenderAttrib) synthesize_shader(const RenderState *rs);
   virtual CPT(RenderAttrib) synthesize_shader(const RenderState *rs);
 
 
@@ -138,8 +137,8 @@ protected:
   void analyze_renderstate(const RenderState *rs);
   void analyze_renderstate(const RenderState *rs);
   void clear_analysis();
   void clear_analysis();
 
 
-  PT(GraphicsStateGuardian) _gsg;
-  PT(GraphicsOutput) _host;
+  PT(GraphicsStateGuardianBase) _gsg;
+  PT(GraphicsOutputBase) _host;
   pmap<WCPT(RenderState), CPT(ShaderAttrib)> _generated_shaders;
   pmap<WCPT(RenderState), CPT(ShaderAttrib)> _generated_shaders;
 
 
 public:
 public: