|
@@ -39,7 +39,9 @@
|
|
|
#include "colorWriteAttrib.h"
|
|
#include "colorWriteAttrib.h"
|
|
|
#include "texMatrixAttrib.h"
|
|
#include "texMatrixAttrib.h"
|
|
|
#include "texGenAttrib.h"
|
|
#include "texGenAttrib.h"
|
|
|
|
|
+#ifdef HAVE_CGGL
|
|
|
#include "cgShaderAttrib.h"
|
|
#include "cgShaderAttrib.h"
|
|
|
|
|
+#endif
|
|
|
#include "materialAttrib.h"
|
|
#include "materialAttrib.h"
|
|
|
#include "renderModeAttrib.h"
|
|
#include "renderModeAttrib.h"
|
|
|
#include "fogAttrib.h"
|
|
#include "fogAttrib.h"
|
|
@@ -2345,9 +2347,10 @@ issue_tex_matrix(const TexMatrixAttrib *attrib) {
|
|
|
// Also maintain the map of CgShader objects to
|
|
// Also maintain the map of CgShader objects to
|
|
|
// respective GLCgShaderContexts
|
|
// respective GLCgShaderContexts
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
+#ifdef HAVE_CGGL
|
|
|
void CLP(GraphicsStateGuardian)::
|
|
void CLP(GraphicsStateGuardian)::
|
|
|
issue_cg_shader_bind(const CgShaderAttrib *attrib) {
|
|
issue_cg_shader_bind(const CgShaderAttrib *attrib) {
|
|
|
-#ifdef HAVE_CGGL
|
|
|
|
|
|
|
+
|
|
|
if (attrib->is_off()) { //Current node has no shaders
|
|
if (attrib->is_off()) { //Current node has no shaders
|
|
|
if (_cg_shader != (CgShader *) NULL) {
|
|
if (_cg_shader != (CgShader *) NULL) {
|
|
|
_gl_cg_shader_contexts[_cg_shader]->un_bind();// Prev node had shaders
|
|
_gl_cg_shader_contexts[_cg_shader]->un_bind();// Prev node had shaders
|
|
@@ -2371,10 +2374,10 @@ issue_cg_shader_bind(const CgShaderAttrib *attrib) {
|
|
|
csc->bind(this);// Bind the new shader
|
|
csc->bind(this);// Bind the new shader
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-#endif
|
|
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
|
|
+}
|
|
|
|
|
+#endif
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: CLP(GraphicsStateGuardian)::issue_tex_gen
|
|
// Function: CLP(GraphicsStateGuardian)::issue_tex_gen
|
|
|
// Access: Public, Virtual
|
|
// Access: Public, Virtual
|