Browse Source

compilation errors

David Rose 15 years ago
parent
commit
848d439f72
2 changed files with 4 additions and 2 deletions
  1. 2 2
      panda/src/gobj/shader.I
  2. 2 0
      panda/src/gobj/shader.cxx

+ 2 - 2
panda/src/gobj/shader.I

@@ -45,10 +45,10 @@ get_filename(const ShaderType &type) const {
 //       Access: Public
 //  Description: Return the Shader's text for the given shader type.
 ////////////////////////////////////////////////////////////////////
-INLINE const string Shader::
+INLINE const string &Shader::
 get_text(const ShaderType &type) const {
   if (_text->_separate) {
-    nassertr(type != ST_none || !_text->_shared.empty(), "");
+    nassertr(type != ST_none || !_text->_shared.empty(), _text->_shared);
     switch (type) {
       case ST_vertex:
         return _text->_vertex;

+ 2 - 0
panda/src/gobj/shader.cxx

@@ -468,6 +468,7 @@ cp_optimize_mat_spec(ShaderMatSpec &spec) {
   spec._dep[1] = cp_dependency(spec._part[1]);
 }
 
+#ifdef HAVE_CG
 ////////////////////////////////////////////////////////////////////
 //     Function: Shader::cg_recurse_parameters
 //       Access: Public
@@ -519,6 +520,7 @@ void Shader::cg_recurse_parameters(CGparameter parameter,
     }
   } while((parameter = cgGetNextParameter(parameter))!= 0);
 }
+#endif  // HAVE_CG
 
 ////////////////////////////////////////////////////////////////////
 //     Function: Shader::compile_parameter