31 _auto_normal_on(false),
33 _auto_gloss_on(false),
35 _auto_shadow_on(false)
46 _shader(copy._shader),
47 _shader_priority(copy._shader_priority),
48 _auto_shader(copy._auto_shader),
49 _has_shader(copy._has_shader),
51 _has_flags(copy._has_flags),
52 _instance_count(copy._instance_count),
53 _auto_normal_on(copy._auto_normal_on),
54 _auto_glow_on(copy._auto_glow_on),
55 _auto_gloss_on(copy._auto_gloss_on),
56 _auto_ramp_on(copy._auto_ramp_on),
57 _auto_shadow_on(copy._auto_shadow_on),
90 INLINE
int ShaderAttrib::
91 get_shader_priority()
const {
92 return _shader_priority;
103 return _instance_count;
111 INLINE
bool ShaderAttrib::
112 get_flag(
int index)
const {
113 return (_flags & (1<<index)) ?
true:
false;
124 return (_inputs.find(
id) != _inputs.end());
133 set_shader_input(
CPT_InternalName id, const PTA_float &v,
int priority)
const {
134 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
143 set_shader_input(
CPT_InternalName id, const PTA_double &v,
int priority)
const {
144 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
153 set_shader_input(
CPT_InternalName id, const PTA_LVecBase4 &v,
int priority)
const {
154 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
163 set_shader_input(
CPT_InternalName id, const PTA_LVecBase3 &v,
int priority)
const {
164 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
174 set_shader_input(
CPT_InternalName id, const PTA_LVecBase2 &v,
int priority)
const {
175 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
185 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
195 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
205 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
214 set_shader_input(
CPT_InternalName id, const PTA_LMatrix4 &v,
int priority)
const {
215 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
224 set_shader_input(
CPT_InternalName id, const PTA_LMatrix3 &v,
int priority)
const {
225 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
235 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
245 return set_shader_input(
new ShaderInput(MOVE(
id), v, priority));
255 return set_shader_input(
new ShaderInput(MOVE(
id), tex, priority));
265 return set_shader_input(
new ShaderInput(MOVE(
id), np, priority));
274 set_shader_input(
CPT_InternalName id,
double n1,
double n2,
double n3,
double n4,
int priority)
const {
284 INLINE
bool ShaderAttrib::
285 auto_normal_on()
const {
286 return _auto_normal_on;
294 INLINE
bool ShaderAttrib::
295 auto_glow_on()
const {
296 return _auto_glow_on;
304 INLINE
bool ShaderAttrib::
305 auto_gloss_on()
const {
306 return _auto_gloss_on;
314 INLINE
bool ShaderAttrib::
315 auto_ramp_on()
const {
316 return _auto_ramp_on;
324 INLINE
bool ShaderAttrib::
325 auto_shadow_on()
const {
326 return _auto_shadow_on;
This is the base class for all three-component vectors and points.
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
bool has_shader() const
If true, the shader field of this attribute overrides the shader field of the parent attribute...
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.
int get_instance_count() const
Returns the number of geometry instances.
bool auto_shader() const
If true, then this ShaderAttrib does not contain an explicit shader - instead, it requests the automa...
This is a 4-by-4 transform matrix.
This is the base class for all two-component vectors and points.
This is the base class for all three-component vectors and points.
This is a 3-by-3 transform matrix.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...