class
instancedescribes the instance-able data contained in the SPIR-V module.
shaders can have many parameters that can be tweaked 'per-material instance' such as colors, or other values. This class describes those types of resources to make it easier and safer to dynamically bind data to instances of materials, and to give hints to the user of what can all be tweaked. A good example of "instance-able" data is object matrix data for instanced rendering. So that you can have many of the same objects rendered in "one call" through instanced rendering. you can view it as the finer detailed level core::meta::shader::descriptor
types
classes
static variables
member-functions
Function documentation
uint32_t core:: meta:: shader:: instance:: size() const noexcept
Returns | the accumulative size in bytes of elements(). |
---|
std::vector<uint8_t> core:: meta:: shader:: instance:: default_value() const noexcept
Returns | a vector containing the "default" value state for this entire structure. |
---|
void core:: meta:: shader:: instance:: size(uint32_t value)
Brief
sets a new size of this structure (in bytes)
Parameters | |
---|---|
value in | the new accumulative size in bytes of all elements. |
bool core:: meta:: shader:: instance:: erase(psl::string8::view element_name)
Brief
tries to find the given element, by name, in this structure and erase it.
Parameters | |
---|---|
element_name in | the element's name that will be used to find and erase a matching element. |
Returns | true if found and erased. |
template<typename S>
void core:: meta:: shader:: instance:: serialize(S& s) private
Brief
method that will be invoked by the serialization system.
Template parameters | |
---|---|
S | the type of the serializer/deserializer |
Parameters | |
s in | instance of a serializer that you can read from, or write to. |