rdb 16 роки тому
батько
коміт
d5a72622e5
2 змінених файлів з 14 додано та 0 видалено
  1. 12 0
      panda/src/pgraph/shaderAttrib.cxx
  2. 2 0
      panda/src/pgraph/shaderAttrib.h

+ 12 - 0
panda/src/pgraph/shaderAttrib.cxx

@@ -281,6 +281,18 @@ clear_shader_input(const string &id) const {
   return clear_shader_input(InternalName::make(id));
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: ShaderAttrib::clear_all_shader_inputs
+//       Access: Published
+//  Description: Clears all the shader inputs on the attrib.
+////////////////////////////////////////////////////////////////////
+CPT(RenderAttrib) ShaderAttrib::
+clear_all_shader_inputs() const {
+  ShaderAttrib *result = new ShaderAttrib(*this);
+  result->_inputs.clear();
+  return return_new(result);
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: ShaderAttrib::get_shader_input
 //       Access: Published

+ 2 - 0
panda/src/pgraph/shaderAttrib.h

@@ -67,6 +67,8 @@ PUBLISHED:
 
   CPT(RenderAttrib) clear_shader_input(InternalName *id) const;
   CPT(RenderAttrib) clear_shader_input(const string &id) const;
+  
+  CPT(RenderAttrib) clear_all_shader_inputs() const;
 
   INLINE bool        get_flag(int flag) const;