Libprimis
Imprimis' 3D destroyable world engine
|
Texture slot objects. More...
Go to the source code of this file.
Classes | |
struct | SlotShaderParam |
struct | Slot |
A representation of a texture inside the engine. More... | |
struct | Slot::Tex |
struct | VSlot |
A virtual texture slot. More... | |
struct | DecalSlot |
Enumerations | |
enum | { VSlot_ShParam = 0 , VSlot_Scale , VSlot_Rotation , VSlot_Offset , VSlot_Scroll , VSlot_Layer , VSlot_Alpha , VSlot_Color , VSlot_Reserved , VSlot_Refract , VSlot_Detail , VSlot_Angle , VSlot_Num } |
Bitmask variables for a VSlot.changed field. More... | |
Functions | |
const char * | getshaderparamname (const char *name, bool insert=true) |
void | setldrnotexture () |
VSlot * | findvslot (const Slot &slot, const VSlot &src, const VSlot &delta) |
VSlot * | editvslot (const VSlot &src, const VSlot &delta) |
Slot & | lookupslot (int slot, bool load=true) |
VSlot & | lookupvslot (int slot, bool load=true) |
bool | unpackvslot (ucharbuf &buf, VSlot &dst, bool delta) |
DecalSlot & | lookupdecalslot (int slot, bool load=true) |
Variables | |
std::vector< Slot * > | slots |
std::vector< VSlot * > | vslots |
std::vector< int * > | editingvslots |
Texture slot objects.
The texture slot objects expose the data structures used to organize geometry texture information and encode it in a level. A vector containing a series of slot objects is associated with every cube object, allowing every cube face to reference a slot "palette" containing many texture + shader combinations without requiring much data stored on the client.
Furthermore, a VSlot
object is defined, which defines a virtual texture slot. These are derived from a "real" texture slot, and can have one or more shader modifiers applied to it: color, scale, rotation etc.
anonymous enum |
Bitmask variables for a VSlot.changed field.
These variables determine what about a virtual texture slot has been changed. Use them by bit shifting by the value of the enum, e.g.