From 4e067a74c19020f2b74ae2daf1becbafc581a870 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 2 Jun 2009 09:57:33 +0000 Subject: [PATCH] Fix couple of circular dependencies, eliminate ShaderGeneratorBase --- panda/src/gsgbase/graphicsStateGuardianBase.h | 1 + panda/src/pgraph/Sources.pp | 3 --- panda/src/pgraph/config_pgraph.cxx | 2 -- panda/src/pgraph/pgraph_composite4.cxx | 1 - panda/src/pgraph/renderState.cxx | 1 - panda/src/pgraphnodes/shaderGenerator.cxx | 3 +-- panda/src/pgraphnodes/shaderGenerator.h | 11 +++++------ 7 files changed, 7 insertions(+), 15 deletions(-) diff --git a/panda/src/gsgbase/graphicsStateGuardianBase.h b/panda/src/gsgbase/graphicsStateGuardianBase.h index 6fd7227b5d..fd45d86ffd 100644 --- a/panda/src/gsgbase/graphicsStateGuardianBase.h +++ b/panda/src/gsgbase/graphicsStateGuardianBase.h @@ -122,6 +122,7 @@ PUBLISHED: virtual bool get_supports_multisample() const=0; virtual int get_supported_geom_rendering() const=0; virtual bool get_supports_occlusion_query() const=0; + virtual bool get_supports_shadow_filter() const=0; public: // These are some general interface functions; they're defined here diff --git a/panda/src/pgraph/Sources.pp b/panda/src/pgraph/Sources.pp index 193240ad51..40ca416052 100644 --- a/panda/src/pgraph/Sources.pp +++ b/panda/src/pgraph/Sources.pp @@ -99,7 +99,6 @@ scissorEffect.I scissorEffect.h \ shadeModelAttrib.I shadeModelAttrib.h \ shaderAttrib.I shaderAttrib.h \ - shaderGeneratorBase.I shaderGeneratorBase.h \ shaderInput.I shaderInput.h \ shaderPool.I shaderPool.h \ showBoundsEffect.I showBoundsEffect.h \ @@ -202,7 +201,6 @@ scissorEffect.cxx \ shadeModelAttrib.cxx \ shaderAttrib.cxx \ - shaderGeneratorBase.cxx \ shaderInput.cxx \ shaderPool.cxx \ showBoundsEffect.cxx \ @@ -303,7 +301,6 @@ scissorEffect.I scissorEffect.h \ shadeModelAttrib.I shadeModelAttrib.h \ shaderAttrib.I shaderAttrib.h \ - shaderGeneratorBase.I shaderGeneratorBase.h \ shaderInput.I shaderInput.h \ shaderPool.I shaderPool.h \ showBoundsEffect.I showBoundsEffect.h \ diff --git a/panda/src/pgraph/config_pgraph.cxx b/panda/src/pgraph/config_pgraph.cxx index a33d355b88..95948df59a 100644 --- a/panda/src/pgraph/config_pgraph.cxx +++ b/panda/src/pgraph/config_pgraph.cxx @@ -89,7 +89,6 @@ #include "transformState.h" #include "transparencyAttrib.h" #include "nodePathLerps.h" -#include "shaderGeneratorBase.h" #include "dconfig.h" @@ -477,7 +476,6 @@ init_libpgraph() { ShadeModelAttrib::init_type(); ShaderInput::init_type(); ShaderAttrib::init_type(); - ShaderGeneratorBase::init_type(); ShowBoundsEffect::init_type(); StateMunger::init_type(); StencilAttrib::init_type(); diff --git a/panda/src/pgraph/pgraph_composite4.cxx b/panda/src/pgraph/pgraph_composite4.cxx index f0afcecd3f..b22dfe6a91 100644 --- a/panda/src/pgraph/pgraph_composite4.cxx +++ b/panda/src/pgraph/pgraph_composite4.cxx @@ -13,7 +13,6 @@ #include "shaderInput.cxx" #include "shaderAttrib.cxx" #include "shaderPool.cxx" -#include "shaderGeneratorBase.cxx" #include "showBoundsEffect.cxx" #include "stateMunger.cxx" #include "stencilAttrib.cxx" diff --git a/panda/src/pgraph/renderState.cxx b/panda/src/pgraph/renderState.cxx index f806f356ca..c7a4aff6f5 100644 --- a/panda/src/pgraph/renderState.cxx +++ b/panda/src/pgraph/renderState.cxx @@ -35,7 +35,6 @@ #include "lightReMutexHolder.h" #include "lightMutexHolder.h" #include "thread.h" -#include "shaderGeneratorBase.h" #include "renderAttribRegistry.h" #include "py_panda.h" diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index 434d0dc3a3..27d9529bbc 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -34,7 +34,6 @@ #include "pointLight.h" #include "spotlight.h" #include "lightLensNode.h" -#include "graphicsEngine.h" #include "lvector4.h" TypeHandle ShaderGenerator::_type_handle; @@ -48,7 +47,7 @@ TypeHandle ShaderGenerator::_type_handle; // which the shader generator belongs. //////////////////////////////////////////////////////////////////// ShaderGenerator:: -ShaderGenerator(PT(GraphicsStateGuardian) gsg, PT(GraphicsOutput) host) : +ShaderGenerator(PT(GraphicsStateGuardianBase) gsg, PT(GraphicsOutputBase) host) : _gsg (gsg), _host (host) { } diff --git a/panda/src/pgraphnodes/shaderGenerator.h b/panda/src/pgraphnodes/shaderGenerator.h index e71feec9e9..fd6483f934 100644 --- a/panda/src/pgraphnodes/shaderGenerator.h +++ b/panda/src/pgraphnodes/shaderGenerator.h @@ -16,9 +16,8 @@ #define SHADERGENERATOR_H #include "pandabase.h" -#include "graphicsStateGuardian.h" -#include "graphicsWindow.h" -#include "shaderGeneratorBase.h" +#include "graphicsStateGuardianBase.h" +#include "graphicsOutputBase.h" #include "nodePath.h" class AmbientLight; @@ -64,7 +63,7 @@ class ShaderAttrib; class EXPCL_PANDA_PGRAPHNODES ShaderGenerator : public TypedObject { PUBLISHED: - ShaderGenerator(PT(GraphicsStateGuardian) gsg, PT(GraphicsOutput) host); + ShaderGenerator(PT(GraphicsStateGuardianBase) gsg, PT(GraphicsOutputBase) host); virtual ~ShaderGenerator(); virtual CPT(RenderAttrib) synthesize_shader(const RenderState *rs); @@ -138,8 +137,8 @@ protected: void analyze_renderstate(const RenderState *rs); void clear_analysis(); - PT(GraphicsStateGuardian) _gsg; - PT(GraphicsOutput) _host; + PT(GraphicsStateGuardianBase) _gsg; + PT(GraphicsOutputBase) _host; pmap _generated_shaders; public: