From a0f5465ad422787640e8886355f92932a8076287 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 22 Dec 2015 20:25:41 +0100 Subject: [PATCH] Add ShaderAttrib::make(shader, priority) --- panda/src/pgraph/shaderAttrib.cxx | 4 ++-- panda/src/pgraph/shaderAttrib.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/panda/src/pgraph/shaderAttrib.cxx b/panda/src/pgraph/shaderAttrib.cxx index 0587bbbaec..6832e2887a 100644 --- a/panda/src/pgraph/shaderAttrib.cxx +++ b/panda/src/pgraph/shaderAttrib.cxx @@ -53,7 +53,7 @@ make_off() { // set. //////////////////////////////////////////////////////////////////// CPT(RenderAttrib) ShaderAttrib:: -make(const Shader *shader) { +make(const Shader *shader, int priority) { static CPT(RenderAttrib) _null_attrib; if (_null_attrib == 0) { ShaderAttrib *attrib = new ShaderAttrib; @@ -63,7 +63,7 @@ make(const Shader *shader) { if (shader == NULL) { return _null_attrib; } else { - return DCAST(ShaderAttrib, _null_attrib)->set_shader(shader); + return DCAST(ShaderAttrib, _null_attrib)->set_shader(shader, priority); } } diff --git a/panda/src/pgraph/shaderAttrib.h b/panda/src/pgraph/shaderAttrib.h index 82f0be657a..0f686f9aac 100644 --- a/panda/src/pgraph/shaderAttrib.h +++ b/panda/src/pgraph/shaderAttrib.h @@ -41,7 +41,7 @@ private: INLINE ShaderAttrib(const ShaderAttrib ©); 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_default();