Go to the documentation of this file.
19 #ifndef SHADERATTRIB_H
20 #define SHADERATTRIB_H
50 F_disable_alpha_write = 0,
51 F_subsume_alpha_test = 1,
52 F_hardware_skinning = 2,
53 F_shader_point_size = 3,
56 INLINE
bool has_shader()
const;
57 INLINE
bool auto_shader()
const;
58 INLINE
int get_shader_priority()
const;
59 INLINE
int get_instance_count()
const;
60 INLINE
bool auto_normal_on()
const;
61 INLINE
bool auto_glow_on()
const;
62 INLINE
bool auto_gloss_on()
const;
63 INLINE
bool auto_ramp_on()
const;
64 INLINE
bool auto_shadow_on()
const;
93 int priority=0)
const;
97 EXTENSION(CPT(
RenderAttrib) set_shader_inputs(PyObject *args, PyObject *kwargs)
const);
99 CPT(
RenderAttrib) set_instance_count(
int instance_count)
const;
105 CPT(
RenderAttrib) clear_shader_input(
const std::string &
id)
const;
109 INLINE
bool get_flag(
int flag)
const;
112 const Shader *get_shader()
const;
114 const ShaderInput &get_shader_input(
const std::string &
id)
const;
117 LVecBase4 get_shader_input_vector(
InternalName *
id)
const;
120 const LMatrix4 &get_shader_input_matrix(
const InternalName *
id, LMatrix4 &matrix)
const;
123 static void register_with_read_factory();
126 MAKE_PROPERTY(shader, get_shader);
127 MAKE_PROPERTY(instance_count, get_instance_count);
130 virtual void output(std::ostream &out)
const;
133 virtual int compare_to_impl(
const RenderAttrib *other)
const;
134 virtual size_t get_hash_impl()
const;
140 int _shader_priority;
147 bool _auto_normal_on;
151 bool _auto_shadow_on;
162 static int get_class_slot() {
165 virtual int get_slot()
const {
166 return get_class_slot();
168 MAKE_PROPERTY(class_slot, get_class_slot);
174 static void init_type() {
175 RenderAttrib::init_type();
177 RenderAttrib::get_class_type());
181 return get_class_type();
183 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
187 static int _attrib_slot;
193 #endif // SHADERATTRIB_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a generic buffer object that lives in graphics memory.
This is the base class for a number of render attributes (other than transform) that may be set on sc...
Encodes a string name in a hash table, mapping it to a pointer.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Represents a set of settings that indicate how a texture is sampled.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
The default class template does not define any methods.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
static int register_slot(TypeHandle type_handle, int sort, RenderAttrib *default_attrib)
Adds the indicated TypeHandle to the registry, if it is not there already, and returns a unique slot ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.