mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Add ShaderAttrib::make(shader, priority)
This commit is contained in:
parent
08c29313b2
commit
a0f5465ad4
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ private:
|
|||||||
INLINE ShaderAttrib(const ShaderAttrib ©);
|
INLINE ShaderAttrib(const ShaderAttrib ©);
|
||||||
|
|
||||||
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();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user