diff --git a/panda/src/pgraph/nodePath.cxx b/panda/src/pgraph/nodePath.cxx index f80388bf87..4247279ba2 100644 --- a/panda/src/pgraph/nodePath.cxx +++ b/panda/src/pgraph/nodePath.cxx @@ -3950,10 +3950,20 @@ set_shader_input(const InternalName *id, const NodePath &np, int priority) { // Description: //////////////////////////////////////////////////////////////////// void NodePath:: -set_shader_input(const InternalName *id, double n1, double n2, double n3, double n4, int priority) { +set_shader_input(const InternalName *id, PN_stdfloat n1, PN_stdfloat n2, PN_stdfloat n3, PN_stdfloat n4, int priority) { set_shader_input(new ShaderInput(id, LVecBase4(n1, n2, n3, n4), priority)); } +//////////////////////////////////////////////////////////////////// +// Function: NodePath::set_shader_input +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +void NodePath:: +set_shader_input(const InternalName *id, int n1, int n2, int n3, int n4, int priority) { + set_shader_input(new ShaderInput(id, LVecBase4i(n1, n2, n3, n4), priority)); +} + //////////////////////////////////////////////////////////////////// // Function: NodePath::set_shader_input // Access: Published @@ -4110,10 +4120,20 @@ set_shader_input(const string &id, const NodePath &np, int priority) { // Description: //////////////////////////////////////////////////////////////////// void NodePath:: -set_shader_input(const string &id, double n1, double n2, double n3, double n4, int priority) { +set_shader_input(const string &id, PN_stdfloat n1, PN_stdfloat n2, PN_stdfloat n3, PN_stdfloat n4, int priority) { set_shader_input(new ShaderInput(InternalName::make(id), LVecBase4(n1, n2, n3, n4), priority)); } +//////////////////////////////////////////////////////////////////// +// Function: NodePath::set_shader_input +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +void NodePath:: +set_shader_input(const string &id, int n1, int n2, int n3, int n4, int priority) { + set_shader_input(new ShaderInput(InternalName::make(id), LVecBase4i(n1, n2, n3, n4), priority)); +} + //////////////////////////////////////////////////////////////////// // Function: NodePath::get_shader_input // Access: Published diff --git a/panda/src/pgraph/nodePath.h b/panda/src/pgraph/nodePath.h index ecfb6b33ed..e7b76168fb 100644 --- a/panda/src/pgraph/nodePath.h +++ b/panda/src/pgraph/nodePath.h @@ -612,7 +612,7 @@ PUBLISHED: void set_shader_auto(int priority = 0); void set_shader_auto(BitMask32 shader_switch, int priority=0); void clear_shader(); - + void set_shader_input(const ShaderInput *inp); void set_shader_input(const InternalName *id, Texture *tex, int priority=0); void set_shader_input(const InternalName *id, const NodePath &np, int priority=0); @@ -622,34 +622,38 @@ PUBLISHED: void set_shader_input(const InternalName *id, const PTA_LVecBase4 &v, int priority=0); void set_shader_input(const InternalName *id, const PTA_LVecBase3 &v, int priority=0); void set_shader_input(const InternalName *id, const PTA_LVecBase2 &v, int priority=0); - void set_shader_input(const InternalName *id, const PTA_LMatrix4 &v, int priority=0); - void set_shader_input(const InternalName *id, const PTA_LMatrix3 &v, int priority=0); - void set_shader_input(const InternalName *id, const LVecBase4 &v, int priority=0); - void set_shader_input(const InternalName *id, const LVecBase3 &v, int priority=0); - void set_shader_input(const InternalName *id, const LVecBase2 &v, int priority=0); - void set_shader_input(const InternalName *id, const LMatrix4 &v, int priority=0); + void set_shader_input(const InternalName *id, const PTA_LMatrix4 &v, int priority=0); + void set_shader_input(const InternalName *id, const PTA_LMatrix3 &v, int priority=0); + void set_shader_input(const InternalName *id, const LVecBase4 &v, int priority=0); + void set_shader_input(const InternalName *id, const LVecBase3 &v, int priority=0); + void set_shader_input(const InternalName *id, const LVecBase2 &v, int priority=0); + void set_shader_input(const InternalName *id, const LMatrix4 &v, int priority=0); void set_shader_input(const InternalName *id, const LMatrix3 &v, int priority=0); - void set_shader_input(const InternalName *id, double n1=0, double n2=0, double n3=0, - double n4=1, int priority=0); + void set_shader_input(const InternalName *id, PN_stdfloat n1, PN_stdfloat n2=0, + PN_stdfloat n3=0, PN_stdfloat n4=0, int priority=0); + void set_shader_input(const InternalName *id, int n1, int n2=0, int n3=0, + int n4=0, int priority=0); void set_shader_input(const string &id, Texture *tex, int priority=0); void set_shader_input(const string &id, const NodePath &np, int priority=0); - void set_shader_input(const string &id, const PTA_float &v, int priority=0); - void set_shader_input(const string &id, const PTA_double &v, int priority=0); - void set_shader_input(const string &id, const PTA_int &v, int priority=0); - void set_shader_input(const string &id, const PTA_LVecBase4 &v, int priority=0); - void set_shader_input(const string &id, const PTA_LVecBase3 &v, int priority=0); - void set_shader_input(const string &id, const PTA_LVecBase2 &v, int priority=0); + void set_shader_input(const string &id, const PTA_float &v, int priority=0); + void set_shader_input(const string &id, const PTA_double &v, int priority=0); + void set_shader_input(const string &id, const PTA_int &v, int priority=0); + void set_shader_input(const string &id, const PTA_LVecBase4 &v, int priority=0); + void set_shader_input(const string &id, const PTA_LVecBase3 &v, int priority=0); + void set_shader_input(const string &id, const PTA_LVecBase2 &v, int priority=0); void set_shader_input(const string &id, const PTA_LMatrix4 &v, int priority=0); void set_shader_input(const string &id, const PTA_LMatrix3 &v, int priority=0); - void set_shader_input(const string &id, const LVecBase4 &v, int priority=0); - void set_shader_input(const string &id, const LVecBase3 &v, int priority=0); - void set_shader_input(const string &id, const LVecBase2 &v, int priority=0); - void set_shader_input(const string &id, const LMatrix4 &v, int priority=0); - void set_shader_input(const string &id, const LMatrix3 &v, int priority=0); - void set_shader_input(const string &id, double n1=0, double n2=0, double n3=0, - double n4=1, int priority=0); - + void set_shader_input(const string &id, const LVecBase4 &v, int priority=0); + void set_shader_input(const string &id, const LVecBase3 &v, int priority=0); + void set_shader_input(const string &id, const LVecBase2 &v, int priority=0); + void set_shader_input(const string &id, const LMatrix4 &v, int priority=0); + void set_shader_input(const string &id, const LMatrix3 &v, int priority=0); + void set_shader_input(const string &id, PN_stdfloat n1, PN_stdfloat n2=0, + PN_stdfloat n3=0, PN_stdfloat n4=0, int priority=0); + void set_shader_input(const string &id, int n1, int n2=0, int n3=0, + int n4=0, int priority=0); + void clear_shader_input(const InternalName *id); void clear_shader_input(const string &id); void set_instance_count(int instance_count);