28 _auto_normal_on(false),
30 _auto_gloss_on(false),
32 _auto_shadow_on(false)
41 _shader(copy._shader),
42 _shader_priority(copy._shader_priority),
43 _auto_shader(copy._auto_shader),
44 _has_shader(copy._has_shader),
46 _has_flags(copy._has_flags),
47 _instance_count(copy._instance_count),
48 _auto_normal_on(copy._auto_normal_on),
49 _auto_glow_on(copy._auto_glow_on),
50 _auto_gloss_on(copy._auto_gloss_on),
51 _auto_ramp_on(copy._auto_ramp_on),
52 _auto_shadow_on(copy._auto_shadow_on),
78 INLINE
int ShaderAttrib::
79 get_shader_priority()
const {
80 return _shader_priority;
87 INLINE
int ShaderAttrib::
88 get_instance_count()
const {
89 return _instance_count;
95 INLINE
bool ShaderAttrib::
96 get_flag(
int index)
const {
97 return (_flags & (1<<index)) ?
true:
false;
105 return (_inputs.find(
id) != _inputs.end());
112 set_shader_input(
CPT_InternalName id,
const PTA_float &v,
int priority)
const {
113 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
120 set_shader_input(
CPT_InternalName id,
const PTA_double &v,
int priority)
const {
121 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
128 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase4 &v,
int priority)
const {
129 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
136 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase3 &v,
int priority)
const {
137 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
145 set_shader_input(
CPT_InternalName id,
const PTA_LVecBase2 &v,
int priority)
const {
146 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
153 set_shader_input(
CPT_InternalName id,
const LVecBase4 &v,
int priority)
const {
154 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
161 set_shader_input(
CPT_InternalName id,
const LVecBase3 &v,
int priority)
const {
162 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
169 set_shader_input(
CPT_InternalName id,
const LVecBase2 &v,
int priority)
const {
170 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
177 set_shader_input(
CPT_InternalName id,
const PTA_LMatrix4 &v,
int priority)
const {
178 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
185 set_shader_input(
CPT_InternalName id,
const PTA_LMatrix3 &v,
int priority)
const {
186 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
193 set_shader_input(
CPT_InternalName id,
const LMatrix4 &v,
int priority)
const {
194 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
201 set_shader_input(
CPT_InternalName id,
const LMatrix3 &v,
int priority)
const {
202 return set_shader_input(
ShaderInput(std::move(
id), v, priority));
210 return set_shader_input(
ShaderInput(std::move(
id), tex, priority));
218 return set_shader_input(
ShaderInput(std::move(
id), np, priority));
225 set_shader_input(
CPT_InternalName id,
double n1,
double n2,
double n3,
double n4,
int priority)
const {
226 return set_shader_input(
ShaderInput(std::move(
id), LVecBase4((PN_stdfloat)n1, (PN_stdfloat)n2, (PN_stdfloat)n3, (PN_stdfloat)n4), priority));
229 INLINE
bool ShaderAttrib::
230 auto_normal_on()
const {
231 return _auto_normal_on;
237 INLINE
bool ShaderAttrib::
238 auto_glow_on()
const {
239 return _auto_glow_on;
245 INLINE
bool ShaderAttrib::
246 auto_gloss_on()
const {
247 return _auto_gloss_on;
253 INLINE
bool ShaderAttrib::
254 auto_ramp_on()
const {
255 return _auto_ramp_on;
261 INLINE
bool ShaderAttrib::
262 auto_shadow_on()
const {
263 return _auto_shadow_on;
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
bool auto_shader() const
If true, then this ShaderAttrib does not contain an explicit shader - instead, it requests the automa...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
bool has_shader_input(CPT_InternalName id) const
Returns true if there is a ShaderInput of the given name.
bool has_shader() const
If true, the shader field of this attribute overrides the shader field of the parent attribute.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...