Support Forum G3D Web Page |
All transient information used by image loading and preprocessing of Textures, collected here so that the process can efficiently run on separate threads in a multithreaded environment. More...
Public Types | |
enum | NextStep { UNINITIALIZED, LOAD_FROM_DISK, PREPROCESS, TRANSFER_TO_GPU, SET_SAMPLER_PARAMETERS, DONE } |
Public Member Functions | |
LoadingInfo (NextStep s) | |
Public Attributes | |
BinaryInput * | binaryInput = nullptr |
The loaded data for the first image, used in LOAD_FROM_DISK. More... | |
CubeMapConvention::CubeMapInfo | cubeMapInfo |
Filled out in Texture::fromFile. More... | |
Encoding | desiredEncoding |
Valid from construction. More... | |
String | filename [6] |
Filenames on disk. More... | |
bool | generateMipMaps = false |
Used during TRANSFER_TO_GPU, set on construction. More... | |
bool | lazyLoadable = false |
If true, the ptbArray owns its data and the calls can be threaded or delayed. More... | |
NextStep | nextStep = LOAD_FROM_DISK |
Loading can be resumed from discrete steps because different factory methods begin at different points in the pipeline, some already having done preliminary preprocessing steps externally. More... | |
int | numFaces = 1 |
Set based on m_dimension on construction. More... | |
bool | preferSRGBForAuto = true |
Used during PREPROCESS when autodetecting formats. More... | |
Preprocess | preprocess |
Used during PREPROCESS. More... | |
MIPCubeFacePTBArray | ptbArray |
ptbArray[mip][face] = the buffer with image data. More... | |
All transient information used by image loading and preprocessing of Textures, collected here so that the process can efficiently run on separate threads in a multithreaded environment.
Using a class for this information works around some MSVC internal compiler errors with lambdas and simplifies the data ownership and collection.
|
inline |
BinaryInput* G3D::Texture::LoadingInfo::binaryInput = nullptr |
The loaded data for the first image, used in LOAD_FROM_DISK.
Set on construction. This must be loaded before a thread is launched so that the metadata (width, height, and format) can be parsed early.
CubeMapConvention::CubeMapInfo G3D::Texture::LoadingInfo::cubeMapInfo |
Filled out in Texture::fromFile.
Encoding G3D::Texture::LoadingInfo::desiredEncoding |
Valid from construction.
May be mutated if the format is ImageFormat::AUTO() after LOAD_FROM_DISK.
String G3D::Texture::LoadingInfo::filename[6] |
Filenames on disk.
Valid on construction, used by LOAD_FROM_DISK.
bool G3D::Texture::LoadingInfo::generateMipMaps = false |
Used during TRANSFER_TO_GPU, set on construction.
bool G3D::Texture::LoadingInfo::lazyLoadable = false |
If true, the ptbArray owns its data and the calls can be threaded or delayed.
NextStep G3D::Texture::LoadingInfo::nextStep = LOAD_FROM_DISK |
Loading can be resumed from discrete steps because different factory methods begin at different points in the pipeline, some already having done preliminary preprocessing steps externally.
int G3D::Texture::LoadingInfo::numFaces = 1 |
Set based on m_dimension on construction.
bool G3D::Texture::LoadingInfo::preferSRGBForAuto = true |
Used during PREPROCESS when autodetecting formats.
Preprocess G3D::Texture::LoadingInfo::preprocess |
Used during PREPROCESS.
MIPCubeFacePTBArray G3D::Texture::LoadingInfo::ptbArray |
ptbArray[mip][face] = the buffer with image data.
numFaces specifies the number of faces and ptbArray.size() is the number of MIPs (frequently, only one).
Valid after LOAD_FROM_DISK. May be mutated by PREPROCESS.