The XML image resource class. More...
|Public Types inherited from Murl::IFactoryObject< IObject >|
|using||ClassInfoArray = Array< const ClassInfo * >|
|Definition of an array of ClassInfo objects. |
|Public Member Functions inherited from Murl::Resource::IObject|
|virtual Bool||GetFileDependencies (Array< String > &fileNames) const =0|
|Fill a given string array with names of files the resource depends on. More...|
|Public Member Functions inherited from Murl::IFactoryObject< IObject >|
|~IFactoryObject () override|
|The destructor. |
|virtual const ClassInfo *||GetObjectClassInfo () const=0|
|Get the object instance's class info, if present. More...|
|virtual void||ResetObjectProperties ()=0|
|Reset the object instance's properties to their default values. |
|Public Member Functions inherited from Murl::Resource::IImage|
|virtual IObject *||GetObjectInterface ()=0|
|Get the mutable Resource::IObject interface. More...|
|virtual const IObject *||GetObjectInterface () const =0|
|Get the constant Resource::IObject interface. More...|
|Static Public Member Functions inherited from Murl::IFactoryObject< IObject >|
|static const PropertyInfo *||GetPropertyInfo ()|
|Get the class' property info struct. More...|
|static const AttributeInfo *||GetAttributeInfo ()|
|Get the class' attribute info struct. More...|
|static void||ResetProperties (IFactoryObject< IObject > *object)|
|Reset an object instance's properties to their default values. More...|
The XML image resource class.
XML image resources can be used as a convenient way to shuffle and mix color channels from a given set of actual input image files to a resulting output image resource, for example to pack as many information into a single texture to save resources and/or shader execution cycles.
An XML image file is recognized by its <Image> root element. The root element accepts the following attributes:
- sizeX, sizeY: As long as all input images (see below) share the same dimensions, these attributes are both optional, and the resulting output image dimensions are taken from the input images. Otherwise, both attributes must be explicitly set to non-zero values for the output image size.
The only allowed child element of an <Image> element is the <MipLevel> element, which accepts the following attribute:
- index: The zero-based MIP level index. A value of 0 represents the base level, i.e. the most detailed one. Note: Currently only MIP level 0 is supported.
Within a <MipLevel> element, the first accepted element is the <Source> element, which defines an input image. It accepts the following attributes:
- id: The ID of the input image by which it is referenced via a <Destination> element below.
- imageFileName: The actual file name of the input image, relative to the XML image resource file itself.
The second accepted element is the <Destination> element, which defines the actual source for each of the four output image color channels. The following attributes are accepted:
- destinationComponent: A string value from the IEnums::ColorComponent enumeration specifying the output color channel, either "RED", "GREEN", "BLUE" or "ALPHA".
- sourceId: The ID of an input image defined via a <Source> element above.
- sourceComponent: The color component of the referenced source image to extract for this output channel.
Example of an XML image file:
Use the <Resource> tag in a .murlres package's resource.xml file to specify an XML image resource. See Resource::Object.
The documentation for this class was generated from the following file: