Browse Source

Add ShaderAttrib::make(shader, priority)

rdb 10 years ago
parent
commit
a0f5465ad4
2 changed files with 3 additions and 3 deletions
  1. 2 2
      panda/src/pgraph/shaderAttrib.cxx
  2. 1 1
      panda/src/pgraph/shaderAttrib.h

+ 2 - 2
panda/src/pgraph/shaderAttrib.cxx

@@ -53,7 +53,7 @@ make_off() {
 //               set.
 //               set.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPT(RenderAttrib) ShaderAttrib::
 CPT(RenderAttrib) ShaderAttrib::
-make(const Shader *shader) {
+make(const Shader *shader, int priority) {
   static CPT(RenderAttrib) _null_attrib;
   static CPT(RenderAttrib) _null_attrib;
   if (_null_attrib == 0) {
   if (_null_attrib == 0) {
     ShaderAttrib *attrib = new ShaderAttrib;
     ShaderAttrib *attrib = new ShaderAttrib;
@@ -63,7 +63,7 @@ make(const Shader *shader) {
   if (shader == NULL) {
   if (shader == NULL) {
     return _null_attrib;
     return _null_attrib;
   } else {
   } else {
-    return DCAST(ShaderAttrib, _null_attrib)->set_shader(shader);
+    return DCAST(ShaderAttrib, _null_attrib)->set_shader(shader, priority);
   }
   }
 }
 }
 
 

+ 1 - 1
panda/src/pgraph/shaderAttrib.h

@@ -41,7 +41,7 @@ private:
   INLINE ShaderAttrib(const ShaderAttrib &copy);
   INLINE ShaderAttrib(const ShaderAttrib &copy);
 
 
 PUBLISHED:
 PUBLISHED:
-  static CPT(RenderAttrib) make(const Shader *shader = NULL);
+  static CPT(RenderAttrib) make(const Shader *shader = NULL, int priority = 0);
   static CPT(RenderAttrib) make_off();
   static CPT(RenderAttrib) make_off();
   static CPT(RenderAttrib) make_default();
   static CPT(RenderAttrib) make_default();