|
|
@@ -17,6 +17,10 @@
|
|
|
#define SHADERGENERATOR_H
|
|
|
|
|
|
#include "pandabase.h"
|
|
|
+#include "typedReferenceCount.h"
|
|
|
+
|
|
|
+#ifdef HAVE_CG
|
|
|
+
|
|
|
#include "graphicsStateGuardianBase.h"
|
|
|
#include "graphicsOutputBase.h"
|
|
|
#include "nodePath.h"
|
|
|
@@ -169,10 +173,34 @@ public:
|
|
|
}
|
|
|
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
|
|
|
|
|
- private:
|
|
|
+private:
|
|
|
+ static TypeHandle _type_handle;
|
|
|
+};
|
|
|
+
|
|
|
+#else
|
|
|
+
|
|
|
+// If we don't have Cg, let's replace this with a stub.
|
|
|
+class EXPCL_PANDA_PGRAPHNODES ShaderGenerator : public TypedReferenceCount {
|
|
|
+public:
|
|
|
+ static TypeHandle get_class_type() {
|
|
|
+ return _type_handle;
|
|
|
+ }
|
|
|
+ static void init_type() {
|
|
|
+ TypedObject::init_type();
|
|
|
+ register_type(_type_handle, "ShaderGenerator",
|
|
|
+ TypedObject::get_class_type());
|
|
|
+ }
|
|
|
+ virtual TypeHandle get_type() const {
|
|
|
+ return get_class_type();
|
|
|
+ }
|
|
|
+ virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
|
|
+
|
|
|
+private:
|
|
|
static TypeHandle _type_handle;
|
|
|
};
|
|
|
|
|
|
#include "shaderGenerator.I"
|
|
|
|
|
|
+#endif // HAVE_CG
|
|
|
+
|
|
|
#endif // SHADERGENERATOR_H
|