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. More...
Public Member Functions | |
DeletedBufferChain | getArrayChain () |
Returns the DeletedBufferChain object that may be used to allocated appropriately-sized arrays of RenderState::Attribute objects. | |
int | getMaxSlots () |
Returns the maximum number that any slot number is allowed to grow. | |
int | getNumSlots () |
Returns the number of RenderAttrib slots that have been allocated. | |
int | getNumSortedSlots () |
Returns the number of entries in the sorted_slots list. | |
int | getSlot (TypeHandle type_handle) |
Returns the slot number assigned to the indicated TypeHandle, or 0 if no slot number has been assigned. | |
RenderAttrib const | getSlotDefault (int slot) |
Returns the default RenderAttrib object associated with slot n. | |
int | getSlotSort (int slot) |
Returns the sort number associated with slot n. | |
TypeHandle | getSlotType (int slot) |
Returns the TypeHandle associated with slot n. | |
int | getSortedSlot (int n) |
Returns the nth slot in sorted order. | |
setSlotSort (int slot, int sort) | |
Changes the sort number associated with slot n. | |
Static Public Member Functions | |
static RenderAttribRegistry | getGlobalPtr () |
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.
DeletedBufferChain getArrayChain | ( | ) |
Returns the DeletedBufferChain object that may be used to allocated appropriately-sized arrays of RenderState::Attribute objects.
static RenderAttribRegistry getGlobalPtr | ( | ) | [static] |
int getMaxSlots | ( | ) |
Returns the maximum number that any slot number is allowed to grow.
Actually, this number will be one higher than the highest possible slot number. This puts an upper bound on the number of RenderAttrib slots that may be allocated, and allows other code to define an array of slots.
This number will not change during the lifetime of the application.
int getNumSlots | ( | ) |
Returns the number of RenderAttrib slots that have been allocated.
This is one more than the highest slot number in use.
int getNumSortedSlots | ( | ) |
Returns the number of entries in the sorted_slots list.
int getSlot | ( | TypeHandle | type_handle | ) |
Returns the slot number assigned to the indicated TypeHandle, or 0 if no slot number has been assigned.
RenderAttrib const getSlotDefault | ( | int | slot | ) |
Returns the default RenderAttrib object associated with slot n.
This is the attrib that should be applied in the absence of any other attrib of this type.
int getSlotSort | ( | int | slot | ) |
Returns the sort number associated with slot n.
TypeHandle getSlotType | ( | int | slot | ) |
Returns the TypeHandle associated with slot n.
int getSortedSlot | ( | int | n | ) |
Returns the nth slot in sorted order.
By traversing this list, you will retrieve all the slot numbers in order according to their registered sort value.
setSlotSort | ( | int | slot, |
int | sort | ||
) |
Changes the sort number associated with slot n.