QtCraft API C++ classes QML types Handbook

QcTextureTools Namespace

Texture pack tools of qtcraft-headless (stage 28): exporting the content's textures as an image texture pack (a starting point for pack authors and how the example pack was made, E-303) and measuring the atlas of the shipped packs (size, memory, build time; E-300). More...

Header: #include <headless/QcTextureTools.h>

Classes

struct ExportRequest

Functions

int exportPack(const QcContentRegistry &content, const QcTextureTools::ExportRequest &request)
int printAtlasStats(const QcContentRegistry &content, const QString &modsDirectory)

Detailed Description

Classes

class ExportRequest

What exportPack() writes (the options of –export-textures). More...

Function Documentation

int QcTextureTools::exportPack(const QcContentRegistry &content, const QcTextureTools::ExportRequest &request)

Writes the textures of content as request asks: texturepack.json, textures/<namespace>/<name>.png and preview.png. Returns the exit code (0 on success, else 1).

int QcTextureTools::printAtlasStats(const QcContentRegistry &content, const QString &modsDirectory)

Builds the atlas of content without packs and with every built-in pack (modsDirectory joins the pack search) and prints one line per pack: requested and used tile size, atlas size, mip levels, memory, load and build time (best of three). Returns 0.