Game Development Reference
In-Depth Information
Using build styles
Marmalade comes with a number of built-in build styles that allow us to build
resources for all the common GPU formats used across mobile devices. The build
styles available are shown in the following table:
Build style
Description
sw
Build resources optimized for use with Marmalade's legacy
software renderer. Resources built in this way cannot be
rendered using hardware acceleration. This format is now
only of use if we are using the IW_USE_LEGACY_MODULES
define in our MKB file in order to make the software renderer
available for use.
gles1
Builds resources without any form of texture compression.
This is the default if no build style is specified.
gles1-pvrtc
Same as gles1 , but uses the PVRTC format for texture
compression on images where this type of compression works
well. Typically this just means images with no alpha channel,
as PVRTC tends to perform badly on such textures.
gles-atitc
Same as gles1 , but uses the ATITC texture compression
format where possible.
gles1-dxt
Same as gles1 , but uses the DXT format for texture
compression.
gles2-etc
Intended for use on devices that make use of OpenGL ES 2.x
and support the ETC texture compression format.
We can also define our own custom build styles should the default ones not
suffice. To do this we create a file in the data directory called resbuildstyles.
itx . This file is automatically loaded by the resource manager when it is initialized
in the call to IwResManagerInit and it contains one or more instances of the
CIwResBuildStyle class.
To declare a build style instance we must give it a name so that it can be selected
for use, an optional list of directories in which resource files can reside, and an
indication of the platform this build style is targeting. Note that in the case of build
styles, the platform does not refer to any particular operating system; instead it
refers to the type of GPU the style targets, which for the most part means the type
of hardware texture compression to be used.
Search WWH ::




Custom Search