Add ShaderAttrib::make(shader, priority)

This commit is contained in:
rdb 2015-12-22 20:25:41 +01:00
parent 08c29313b2
commit a0f5465ad4
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -41,7 +41,7 @@ private:
INLINE ShaderAttrib(const ShaderAttrib &copy);
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();