15 #ifndef RENDERATTRIBREGISTRY_H 16 #define RENDERATTRIBREGISTRY_H 18 #include "pandabase.h" 19 #include "typeHandle.h" 20 #include "vector_int.h" 21 #include "pointerTo.h" 51 int register_slot(
TypeHandle type_handle,
int sort,
52 MakeDefaultFunc *make_default_func);
55 INLINE
int get_slot(
TypeHandle type_handle)
const;
56 INLINE
int get_max_slots()
const;
58 INLINE
int get_num_slots()
const;
59 INLINE
TypeHandle get_slot_type(
int slot)
const;
60 INLINE
int get_slot_sort(
int slot)
const;
61 void set_slot_sort(
int slot,
int sort);
64 INLINE
int get_num_sorted_slots()
const;
65 INLINE
int get_sorted_slot(
int n)
const;
75 static void init_global_ptr();
83 INLINE
bool operator () (
int a,
int b)
const;
91 MakeDefaultFunc *_make_default_func;
96 vector_int _slots_by_type;
97 vector_int _sorted_slots;
104 #include "renderAttribRegistry.I" This is the base class for a number of render attributes (other than transform) that may be set on sc...
This class is used to associate each RenderAttrib with a different slot index at runtime, so we can store a list of RenderAttribs in the RenderState object, and very quickly look them up by type.
TypeHandle is the identifier used to differentiate C++ class types.
This template class can be used to provide faster allocation/deallocation for many Panda objects...