mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
CgShader added compile protection
This commit is contained in:
parent
d14e75b6cb
commit
91e54d09f3
@ -39,7 +39,9 @@
|
||||
#include "colorWriteAttrib.h"
|
||||
#include "texMatrixAttrib.h"
|
||||
#include "texGenAttrib.h"
|
||||
#ifdef HAVE_CGGL
|
||||
#include "cgShaderAttrib.h"
|
||||
#endif
|
||||
#include "materialAttrib.h"
|
||||
#include "renderModeAttrib.h"
|
||||
#include "fogAttrib.h"
|
||||
@ -2345,9 +2347,10 @@ issue_tex_matrix(const TexMatrixAttrib *attrib) {
|
||||
// Also maintain the map of CgShader objects to
|
||||
// respective GLCgShaderContexts
|
||||
////////////////////////////////////////////////////////////////////
|
||||
#ifdef HAVE_CGGL
|
||||
void CLP(GraphicsStateGuardian)::
|
||||
issue_cg_shader_bind(const CgShaderAttrib *attrib) {
|
||||
#ifdef HAVE_CGGL
|
||||
|
||||
if (attrib->is_off()) { //Current node has no shaders
|
||||
if (_cg_shader != (CgShader *) NULL) {
|
||||
_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
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: CLP(GraphicsStateGuardian)::issue_tex_gen
|
||||
// Access: Public, Virtual
|
||||
|
@ -35,7 +35,9 @@
|
||||
#include "graphicsWindow.h"
|
||||
#include "pset.h"
|
||||
#include "pmap.h"
|
||||
#ifdef HAVE_CGGL
|
||||
#include "cgShader.h"
|
||||
#endif
|
||||
class PlaneNode;
|
||||
class Light;
|
||||
|
||||
@ -109,7 +111,9 @@ public:
|
||||
virtual void issue_fog(const FogAttrib *attrib);
|
||||
virtual void issue_depth_offset(const DepthOffsetAttrib *attrib);
|
||||
virtual void issue_tex_gen(const TexGenAttrib *attrib);
|
||||
#ifdef HAVE_CGGL
|
||||
virtual void issue_cg_shader_bind(const CgShaderAttrib *attrib);
|
||||
#endif
|
||||
// virtual void issue_stencil(const StencilAttrib *attrib);
|
||||
|
||||
virtual void bind_light(PointLight *light_obj, const NodePath &light,
|
||||
|
Loading…
x
Reference in New Issue
Block a user