|
@@ -31,10 +31,7 @@ INLINE ShaderInput::
|
|
|
ShaderInput(CPT_InternalName name, int priority) :
|
|
ShaderInput(CPT_InternalName name, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_invalid),
|
|
_type(M_invalid),
|
|
|
- _priority(priority),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _priority(priority)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -48,58 +45,8 @@ ShaderInput(CPT_InternalName name, Texture *tex, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_texture),
|
|
_type(M_texture),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _value(tex),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read | A_write | A_layered)
|
|
|
|
|
-{
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: ShaderInput::Constructor
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description:
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE ShaderInput::
|
|
|
|
|
-ShaderInput(CPT_InternalName name, Texture *tex, const SamplerState &sampler, int priority) :
|
|
|
|
|
- _name(MOVE(name)),
|
|
|
|
|
- _type(M_texture_sampler),
|
|
|
|
|
- _priority(priority),
|
|
|
|
|
- _value(tex),
|
|
|
|
|
- _sampler(sampler),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read | A_layered)
|
|
|
|
|
-{
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: ShaderInput::Constructor
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description:
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE ShaderInput::
|
|
|
|
|
-ShaderInput(CPT_InternalName name, Texture *tex, bool read, bool write, int z, int n, int priority) :
|
|
|
|
|
- _name(MOVE(name)),
|
|
|
|
|
- _type(M_texture),
|
|
|
|
|
- _priority(priority),
|
|
|
|
|
- _value(tex),
|
|
|
|
|
- _bind_layer(z),
|
|
|
|
|
- _bind_level(n),
|
|
|
|
|
- _access(0)
|
|
|
|
|
|
|
+ _value(tex)
|
|
|
{
|
|
{
|
|
|
- if (read) {
|
|
|
|
|
- _access |= A_read;
|
|
|
|
|
- }
|
|
|
|
|
- if (write) {
|
|
|
|
|
- _access |= A_write;
|
|
|
|
|
- }
|
|
|
|
|
- if (z >= 0) {
|
|
|
|
|
- _bind_layer = z;
|
|
|
|
|
- } else {
|
|
|
|
|
- _bind_layer = 0;
|
|
|
|
|
- _access |= A_layered;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -112,10 +59,7 @@ ShaderInput(CPT_InternalName name, ParamValueBase *param, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_param),
|
|
_type(M_param),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _value(param),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _value(param)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -129,10 +73,7 @@ ShaderInput(CPT_InternalName name, const PTA_float &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -146,10 +87,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase4f &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -163,10 +101,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase3f &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -180,10 +115,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase2f &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -198,10 +130,7 @@ ShaderInput(CPT_InternalName name, const LVecBase4f &vec, int priority) :
|
|
|
_type(M_vector),
|
|
_type(M_vector),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector(LCAST(PN_stdfloat, vec)),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector(LCAST(PN_stdfloat, vec))
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -216,10 +145,7 @@ ShaderInput(CPT_InternalName name, const LVecBase3f &vec, int priority) :
|
|
|
_type(M_vector),
|
|
_type(M_vector),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector(vec.get_x(), vec.get_y(), vec.get_z(), 0.0),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector(vec.get_x(), vec.get_y(), vec.get_z(), 0.0)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -234,10 +160,7 @@ ShaderInput(CPT_InternalName name, const LVecBase2f &vec, int priority) :
|
|
|
_type(M_vector),
|
|
_type(M_vector),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector(vec.get_x(), vec.get_y(), 0.0, 0.0),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector(vec.get_x(), vec.get_y(), 0.0, 0.0)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -251,10 +174,7 @@ ShaderInput(CPT_InternalName name, const PTA_LMatrix4f &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -268,10 +188,7 @@ ShaderInput(CPT_InternalName name, const PTA_LMatrix3f &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -285,10 +202,7 @@ ShaderInput(CPT_InternalName name, const LMatrix4f &mat, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(mat),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(mat)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -302,10 +216,7 @@ ShaderInput(CPT_InternalName name, const LMatrix3f &mat, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(mat),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(mat)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -319,10 +230,7 @@ ShaderInput(CPT_InternalName name, const PTA_double &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -336,10 +244,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase4d &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -353,10 +258,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase3d &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -370,10 +272,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase2d &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -388,10 +287,7 @@ ShaderInput(CPT_InternalName name, const LVecBase4d &vec, int priority) :
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector(LCAST(PN_stdfloat, vec)),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector(LCAST(PN_stdfloat, vec))
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -406,10 +302,7 @@ ShaderInput(CPT_InternalName name, const LVecBase3d &vec, int priority) :
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector(vec.get_x(), vec.get_y(), vec.get_z(), 0.0),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector(vec.get_x(), vec.get_y(), vec.get_z(), 0.0)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -424,10 +317,7 @@ ShaderInput(CPT_InternalName name, const LVecBase2d &vec, int priority) :
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector(vec.get_x(), vec.get_y(), 0.0, 0.0),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector(vec.get_x(), vec.get_y(), 0.0, 0.0)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -441,10 +331,7 @@ ShaderInput(CPT_InternalName name, const PTA_LMatrix4d &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -458,10 +345,7 @@ ShaderInput(CPT_InternalName name, const PTA_LMatrix3d &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -475,10 +359,7 @@ ShaderInput(CPT_InternalName name, const LMatrix4d &mat, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(mat),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(mat)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -492,10 +373,7 @@ ShaderInput(CPT_InternalName name, const LMatrix3d &mat, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(mat),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(mat)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -509,10 +387,7 @@ ShaderInput(CPT_InternalName name, const PTA_int &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -526,10 +401,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase4i &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -543,10 +415,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase3i &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -560,10 +429,7 @@ ShaderInput(CPT_InternalName name, const PTA_LVecBase2i &ptr, int priority) :
|
|
|
_name(MOVE(name)),
|
|
_name(MOVE(name)),
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
- _stored_ptr(ptr),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_ptr(ptr)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -578,10 +444,7 @@ ShaderInput(CPT_InternalName name, const LVecBase4i &vec, int priority) :
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector((int)vec.get_x(), (int)vec.get_y(), (int)vec.get_z(), (int)vec.get_w()),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector((int)vec.get_x(), (int)vec.get_y(), (int)vec.get_z(), (int)vec.get_w())
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -596,10 +459,7 @@ ShaderInput(CPT_InternalName name, const LVecBase3i &vec, int priority) :
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector((int)vec.get_x(), (int)vec.get_y(), (int)vec.get_z(), 0.0),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector((int)vec.get_x(), (int)vec.get_y(), (int)vec.get_z(), 0.0)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -614,10 +474,7 @@ ShaderInput(CPT_InternalName name, const LVecBase2i &vec, int priority) :
|
|
|
_type(M_numeric),
|
|
_type(M_numeric),
|
|
|
_priority(priority),
|
|
_priority(priority),
|
|
|
_stored_ptr(vec),
|
|
_stored_ptr(vec),
|
|
|
- _stored_vector((int)vec.get_x(), (int)vec.get_y(), 0.0, 0.0),
|
|
|
|
|
- _bind_layer(0),
|
|
|
|
|
- _bind_level(0),
|
|
|
|
|
- _access(A_read)
|
|
|
|
|
|
|
+ _stored_vector((int)vec.get_x(), (int)vec.get_y(), 0.0, 0.0)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -651,16 +508,6 @@ get_priority() const {
|
|
|
return _priority;
|
|
return _priority;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: ShaderInput::get_texture
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description:
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE Texture *ShaderInput::
|
|
|
|
|
-get_texture() const {
|
|
|
|
|
- return DCAST(Texture, _value);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: ShaderInput::get_vector
|
|
// Function: ShaderInput::get_vector
|
|
|
// Access: Published
|
|
// Access: Published
|
|
@@ -681,18 +528,6 @@ get_ptr() const {
|
|
|
return _stored_ptr;
|
|
return _stored_ptr;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: ShaderInput::get_sampler
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description:
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE const SamplerState &ShaderInput::
|
|
|
|
|
-get_sampler() const {
|
|
|
|
|
- return (_type == M_texture)
|
|
|
|
|
- ? get_texture()->get_default_sampler()
|
|
|
|
|
- : _sampler;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: ShaderInput::get_param
|
|
// Function: ShaderInput::get_param
|
|
|
// Access: Public
|
|
// Access: Public
|