Resource Export Options

Resource options are set at a global level and at an individual level. All resources will use the global setting for an option if the option is not changed at the individual level. This allows for a quick setting of options for the general case of how a resource should be exported but then also allows for more granular control over individual resources that need to be exportted in a different way. For example, most images in an application may have alpha. So in an VFS configuration, most images should probably be exportted as the "DIRECT RGB8888" format. However for a big background image, that has no alpha, it may make sense to export that image as the "DIRECT RGB565" format as this will save on space.

There are two options that are applied to the configuration. There is the name and the storage type. The name must be unique and the "Default" configuration cannot be renamed. The options for the storage type are: All of the global options are mirrors of the individual options that can be set on an individual resource. There are global options and individual resources for images, fonts and scripts.

Filesystem

This will export resources to a filesystem. This selection disables the need for a majority of the options on the resources as they will be loaded and intepretted from the filesystem based on the type of resource they are the exception to this rule is script files. They can be exported as compiled scripts to a filesystem.

Virtual Filesystem

This will export resources in a virtual filesystem format. This selection is only available for use with the C Header exporter. This enables a majority of the option as the C Header export is used with systems that have constrained resources.

When the VFS format is selected as the storage type, the "Font Export Format" option is enabled for the configuration. This is a global option as the mxing of bitmap and truetype font configurations is not currently supported. The choices for the "Font Export Format" are:

TTF

This will export all fonts as a ttf file. This file will require the TrueType font manager to be used. Each ttf file that is needed will be loaded in to memory and the glyphs that are used will be stored in a cache in the heap.

Bitmap

This will export each individual glyph in a font file as an alpha map. The size of each individual pixel in the alpha map can be controlled through the "Font Bitmap Depth" option.

When the "Font Export Format" is set to the "Bitmap" option then the "Font Bitmap Depth" option will be enabled. This option is something that can be controlled on each individual font size resource as larger sizes may take up more space. The choices for the "Font Bitmap Depth" option are:

1 Bit

This will export the bitmap font as an alphamap that has 1 bit per pixel in the alphamap. This bit determines if a pixel should be on or off.

2 Bits

This will export the bitmap font as an alphamap that has 2 bits per pixel in the alphamap. These 2 bits represent the alpha value that should be used for that pixel

4 Bits

This will export the bitmap font as an alphamap that has 4 bits per pixel in the alphamap. These 4 bits represent the alpha value that should be used for that pixel

8 Bits

This will export the bitmap font as an alphamap that has 8 bits per pixel in the alphamap. These 8 bits represent the alpha value that should be used for that pixel

If the "Font Export Format" is set to the "Bitmap" option then the "Font Glyph Map Width" option will be enabled. This option is an option that can be set on each individual font size. It controls how wide a glyph map width can be. It is useful if a system has alignment restrictions when rendering buffers. The "Max Glyph Width" checkbox will set the "Glyph Map Width" to the width of the largest glyph in the font. This creates a single strip of glyphs in the glyph map.

The "Image Export Format" option will become enabled when the "VFS" option is specified as the "Storage Type". The available image export formats are:

Native Format

This will export the image in its native format, such as a PNG or JPEG. This will require the image to be decoded at runtime which will require heap.

Direct RGB8888

This will export the image as an uncompressed image that has 32 bits per pixel. This image can then be drawn directly from storage without the need for heap.

Direct RLE RGB8888

This will export the image as run length encoded image that has 32 bits per pixel. This image can then be drawn directly from storage without the need for heap, but will require the pixels to be expanded as it is being draw, which may incur a perforamance hit. It will in most cases take up less space.

Direct RGB565

This will export the image as an uncompressed image that has 16 bits per pixels. This image can then be drawn directly from storage without the need for heap. The image will take up less space than the DIRECT RGB8888, but it will not support alpha. Also gradients may show banding due to a reduction in color fidelity.

Direct RGB565 Dithered

This will export the image as an uncompressed image that has 16 bits per pixels that has been dithered. This image can then be drawn directly from storage without the need for heap. The image will take up less space than the DIRECT RGB8888, but it will not support alpha. Gradients should not have banding due to the dithering.

Direct Indexed

This will export the image as an uncompressed image that is palette based. This image can then be drawn directly from storage without the need for heap. The image will take up less space than the DIRECT RGB8888. Colors may look different because they will be matched to colors in the palette.

Direct RLE Indexed

This will export the image as an run length encoded image that is palette based. This image can then be drawn directly from storage without the need for heap, but will require the pixels to be expanded as it is being draw, which may incur a perforamance hit. It will in most cases take up less space.

The "Image Start Alignment" option will become enabled when the "VFS" option is specified as the "Storage Type". The value that is specified for this option is the alignment that is used for the image data in any of the direct rendering image format options. The "Image Map Width" option will become enabled when the "VFS" option is specified as the "Storage Type". This is an option that can be set individually on image maps. This will set the width that the image map will use. The height of the image map will be set to whatever is required to fit all images in the image map.

The "Script Export Format" option controls how lua scripts are export. The options are:

Raw

This will export the script file as plain text. It will need to be compiled by the Lua engine when it is loaded.

Bitmap

This will precompile the Lua file when it is exported, so that the Lua engine does not need to do it at runtime.

Additionally each resource has an "Include in Export" option. If this option is unchecked, the resource will be omitted from the export.