21 _name(
std::move(name)),
32 _name(
std::move(name)),
44 _name(
std::move(name)),
56 _name(
std::move(name)),
68 _name(
std::move(name)),
80 _name(
std::move(name)),
92 _name(
std::move(name)),
103ShaderInput(
CPT_InternalName name,
const PTA_LVecBase2f &ptr,
int priority) :
104 _name(
std::move(name)),
116 _name(
std::move(name)),
120 _stored_vector(LCAST(PN_stdfloat, vec))
129 _name(
std::move(name)),
133 _stored_vector(vec.get_x(), vec.get_y(), vec.get_z(), 0.0)
142 _name(
std::move(name)),
146 _stored_vector(vec.get_x(), vec.get_y(), 0.0, 0.0)
155 _name(
std::move(name)),
167 _name(
std::move(name)),
179 _name(
std::move(name)),
191 _name(
std::move(name)),
203 _name(
std::move(name)),
214ShaderInput(
CPT_InternalName name,
const PTA_LVecBase4d &ptr,
int priority) :
215 _name(
std::move(name)),
226ShaderInput(
CPT_InternalName name,
const PTA_LVecBase3d &ptr,
int priority) :
227 _name(
std::move(name)),
238ShaderInput(
CPT_InternalName name,
const PTA_LVecBase2d &ptr,
int priority) :
239 _name(
std::move(name)),
251 _name(
std::move(name)),
255 _stored_vector(LCAST(PN_stdfloat, vec))
264 _name(
std::move(name)),
268 _stored_vector(vec.get_x(), vec.get_y(), vec.get_z(), 0.0)
277 _name(
std::move(name)),
281 _stored_vector(vec.get_x(), vec.get_y(), 0.0, 0.0)
290 _name(
std::move(name)),
302 _name(
std::move(name)),
314 _name(
std::move(name)),
326 _name(
std::move(name)),
338 _name(
std::move(name)),
349ShaderInput(
CPT_InternalName name,
const PTA_LVecBase4i &ptr,
int priority) :
350 _name(
std::move(name)),
361ShaderInput(
CPT_InternalName name,
const PTA_LVecBase3i &ptr,
int priority) :
362 _name(
std::move(name)),
373ShaderInput(
CPT_InternalName name,
const PTA_LVecBase2i &ptr,
int priority) :
374 _name(
std::move(name)),
386 _name(
std::move(name)),
390 _stored_vector((int)vec.get_x(), (int)vec.get_y(), (int)vec.get_z(), (int)vec.get_w())
399 _name(
std::move(name)),
403 _stored_vector((int)vec.get_x(), (int)vec.get_y(), (int)vec.get_z(), 0.0)
412 _name(
std::move(name)),
416 _stored_vector((int)vec.get_x(), (int)vec.get_y(), 0.0, 0.0)
424operator bool ()
const {
425 return _type != M_invalid;
431INLINE
bool ShaderInput::
433 if (_type != other._type || _name != other._name || _priority != other._priority) {
441 return _stored_vector == other._stored_vector;
444 return _stored_ptr._ptr == other._stored_ptr._ptr;
447 return _value == other._value;
454INLINE
bool ShaderInput::
456 if (_type != other._type || _name != other._name || _priority != other._priority) {
464 return _stored_vector != other._stored_vector;
467 return _stored_ptr._ptr != other._stored_ptr._ptr;
470 return _value != other._value;
477INLINE
bool ShaderInput::
479 if (_type != other._type) {
480 return (_type < other._type);
482 if (_name != other._name) {
483 return (_name < other._name);
485 if (_priority != other._priority) {
486 return (_priority < other._priority);
493 if (_stored_vector[0] != other._stored_vector[0]) {
494 return _stored_vector[0] < other._stored_vector[0];
496 if (_stored_vector[1] != other._stored_vector[1]) {
497 return _stored_vector[1] < other._stored_vector[1];
499 if (_stored_vector[2] != other._stored_vector[2]) {
500 return _stored_vector[2] < other._stored_vector[2];
502 if (_stored_vector[3] != other._stored_vector[3]) {
503 return _stored_vector[3] < other._stored_vector[3];
508 return _stored_ptr._ptr < other._stored_ptr._ptr;
511 return _value < other._value;
526INLINE
int ShaderInput::
527get_value_type()
const {
534INLINE
int ShaderInput::
535get_priority()
const {
542INLINE
const LVecBase4 &ShaderInput::
544 return _stored_vector;
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
Encodes a string name in a hash table, mapping it to a pointer.
A non-template base class of ParamValue (below), which serves mainly to define the placeholder for th...
This is a generic buffer object that lives in graphics memory.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.