jade-engine  0.0
JadeEngine::GameInitParamsTextureEntry Struct Reference

#include <GameInitParams.h>

Public Attributes

std::string assetName
 
std::string fileLocation
 
bool generateHitMap
 
TextureSampling sampling
 

Detailed Description

Parameters for loading a texture.

Member Data Documentation

◆ assetName

std::string JadeEngine::GameInitParamsTextureEntry::assetName

String to identify the texture that will be used to reference it when creating game objects with textures.

Must be unique across all loaded textures.

◆ fileLocation

std::string JadeEngine::GameInitParamsTextureEntry::fileLocation

String with full path to the texture file relative to the executable.

For example "assets/engineUI.png".

◆ generateHitMap

bool JadeEngine::GameInitParamsTextureEntry::generateHitMap

Whether to run additional processing on the texture to create a hit map.

Hit map simply remembers for each pixel of the texture whether it is opaque (alpha > 0). This is then be used in Sprite::HitTest method, for example when more precise action of clicking on an object is necessary.

Note that this processing can be expensive and has significant memory footprint per texture.

See also
Sprite::HitTest

◆ sampling

TextureSampling JadeEngine::GameInitParamsTextureEntry::sampling

How will the texture be sampled when rendering it in a different scale then 100%.

It is possible to overwrite this per Sprite at the cost of texture copy.

See also
TextureSampling, Sprite::SetSampling

The documentation for this struct was generated from the following file: