Utility class that allows to load content through their declaration files. More...
Utility class that allows to load content through their declaration files.
|
noexcept |
Constructor.
system | The system the resource should live in. |
nkExport::ExporterLoadResult nkGraphics::ContentLoader::inputData | ( | nkMemory::StringView | filePath | ) |
Inputs data from a file and returns associated tree, if parsing can occur. It will use Json parsing.
filePath | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
std::string nkGraphics::ContentLoader::inputDataStr | ( | nkMemory::StringView | filePath | ) |
Inputs data from a file and only get the sources.
filePath | The file to find. |
nkExport::ExporterLoadResult nkGraphics::ContentLoader::inputDataSources | ( | nkMemory::StringView | sources | ) |
Inputs data from memory and returns associated tree, if parsing can occur. It will use Json parsing.
sources | The sources to parse. |
bool nkGraphics::ContentLoader::outputData | ( | nkMemory::StringView | content, |
nkMemory::StringView | path | ||
) |
Writes data to a file.
content | The content to write. |
path | The path, relative to working directory, to output the file to. See nkResources::ResourceManager for path naming convention. |
bool nkGraphics::ContentLoader::saveTreeDeclaration | ( | nkExport::Node * | tree, |
nkMemory::StringView | pathFromData | ||
) |
Saves an aready exported tree into a file.
tree | The tree to export. |
pathFromData | The path, relative to working directory, to output the file to. See nkResources::ResourceManager for path naming convention. |
bool nkGraphics::ContentLoader::saveObjectDeclaration | ( | nkExport::Exportable * | object, |
nkMemory::StringView | pathFromData | ||
) |
Saves an exportable into a file.
object | The object to serialize and export. |
pathFromData | The path, relative to working directory, to output the file to. See nkResources::ResourceManager for path naming convention. |
ContentLoadResultTexture nkGraphics::ContentLoader::loadTextureDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a texture declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultTexture nkGraphics::ContentLoader::processTextureSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a texture declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultTexture nkGraphics::ContentLoader::processTextureTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a texture declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultSampler nkGraphics::ContentLoader::loadSamplerDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a sampler declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultSampler nkGraphics::ContentLoader::processSamplerSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a sampler declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultSampler nkGraphics::ContentLoader::processSamplerTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a sampler declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultProgram nkGraphics::ContentLoader::loadShaderProgramDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a shader program declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultProgram nkGraphics::ContentLoader::processShaderProgramSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a shader program declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultProgram nkGraphics::ContentLoader::processShaderProgramTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a shader program declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultShaderMemorySlot nkGraphics::ContentLoader::loadShaderMemorySlotDeclaration | ( | nkMemory::StringView | pathFromData | ) |
Loads a memory slot declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
ContentLoadResultShaderMemorySlot nkGraphics::ContentLoader::processShaderMemorySlotSources | ( | nkMemory::StringView | sources | ) |
Loads a memory slot declaration, from memory.
sources | The memory chunk to interpret. |
ContentLoadResultShaderMemorySlot nkGraphics::ContentLoader::processShaderMemorySlotDeclarationTree | ( | nkExport::Node * | tree | ) |
Loads a memory slot declaration, from an existing tree.
tree | The tree to interpret. |
ContentLoadResultConstantBuffer nkGraphics::ContentLoader::loadConstantBufferDeclaration | ( | nkMemory::StringView | pathFromData | ) |
Loads a constant buffer declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
ContentLoadResultConstantBuffer nkGraphics::ContentLoader::processConstantBufferSources | ( | nkMemory::StringView | sources | ) |
Loads a constant buffer declaration, from memory.
sources | The memory chunk to interpret. |
ContentLoadResultConstantBuffer nkGraphics::ContentLoader::processConstantBufferDeclarationTree | ( | nkExport::Node * | tree | ) |
Loads a constant buffer declaration, from an existing tree.
tree | The tree to interpret. |
ContentLoadResultBuffer nkGraphics::ContentLoader::loadBufferDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a buffer declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultBuffer nkGraphics::ContentLoader::processBufferSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a buffer declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultBuffer nkGraphics::ContentLoader::processBufferDeclarationTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a buffer declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultShader nkGraphics::ContentLoader::loadShaderDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a shader declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultShader nkGraphics::ContentLoader::processShaderDeclarationSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a shader declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultShader nkGraphics::ContentLoader::processShaderDeclarationTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a shader declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultPass nkGraphics::ContentLoader::loadPassDeclaration | ( | nkMemory::StringView | pathFromData | ) |
Loads a pass declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
ContentLoadResultPass nkGraphics::ContentLoader::processPassSources | ( | nkMemory::StringView | sources | ) |
Loads a pass declaration, from memory.
sources | The memory chunk to interpret. |
ContentLoadResultPass nkGraphics::ContentLoader::processPassTree | ( | nkExport::Node * | tree | ) |
Loads a pass declaration, from an existing tree.
tree | The tree to interpret. |
ContentLoadResultCompositor nkGraphics::ContentLoader::loadCompositorDeclaration | ( | nkMemory::StringView | pathFromData | ) |
Loads a compositor declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
ContentLoadResultCompositor nkGraphics::ContentLoader::processCompositorSources | ( | nkMemory::StringView | sources | ) |
Loads a compositor declaration, from memory.
sources | The memory chunk to interpret. |
ContentLoadResultCompositor nkGraphics::ContentLoader::processCompositorTree | ( | nkExport::Node * | tree | ) |
Loads a compositor declaration, from an existing tree.
tree | The tree to interpret. |
ContentLoadResultMesh nkGraphics::ContentLoader::loadMeshDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a mesh declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultMesh nkGraphics::ContentLoader::processMeshSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a mesh declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultMesh nkGraphics::ContentLoader::processMeshTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a mesh declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultNode nkGraphics::ContentLoader::loadNodeDeclaration | ( | nkMemory::StringView | pathFromData | ) |
Loads a node declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
ContentLoadResultNode nkGraphics::ContentLoader::processNodeSources | ( | nkMemory::StringView | sources | ) |
Loads a node declaration, from memory.
sources | The memory chunk to interpret. |
ContentLoadResultNode nkGraphics::ContentLoader::processNodeTree | ( | nkExport::Node * | tree | ) |
Loads a node declaration, from an existing tree.
tree | The tree to interpret. |
ContentLoadResultBlendState nkGraphics::ContentLoader::loadBlendStateDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a blend state declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultBlendState nkGraphics::ContentLoader::processBlendStateSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a blend state declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultBlendState nkGraphics::ContentLoader::processBlendStateTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a blend state declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultDepthStencilState nkGraphics::ContentLoader::loadDepthStencilStateDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a depth and stencil state declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultDepthStencilState nkGraphics::ContentLoader::processDepthStencilStateSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a depth and stencil state declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultDepthStencilState nkGraphics::ContentLoader::processDepthStencilStateTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a depth and stencil state declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultRasterState nkGraphics::ContentLoader::loadRasterStateDeclaration | ( | nkMemory::StringView | pathFromData, |
bool | loadResource = true |
||
) |
Loads a raster state declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultRasterState nkGraphics::ContentLoader::processRasterStateSources | ( | nkMemory::StringView | sources, |
bool | loadResource = true |
||
) |
Loads a raster state declaration, from memory.
sources | The memory chunk to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultRasterState nkGraphics::ContentLoader::processRasterStateTree | ( | nkExport::Node * | tree, |
bool | loadResource = true |
||
) |
Loads a raster state declaration, from an existing tree.
tree | The tree to interpret. |
loadResource | Whether the resource should be loaded in place (true) or not (false). |
ContentLoadResultCamera nkGraphics::ContentLoader::loadCameraDeclaration | ( | nkMemory::StringView | pathFromData | ) |
Loads a camera declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
ContentLoadResultCamera nkGraphics::ContentLoader::processCameraSources | ( | nkMemory::StringView | sources | ) |
Loads a camera declaration, from memory.
sources | The memory chunk to interpret. |
ContentLoadResultCamera nkGraphics::ContentLoader::processCameraTree | ( | nkExport::Node * | tree | ) |
Loads a camera declaration, from an existing tree.
tree | The tree to interpret. |
ContentLoadResultRenderQueue nkGraphics::ContentLoader::loadRenderQueueDeclaration | ( | nkMemory::StringView | pathFromData | ) |
Loads a render queue declaration, from a file.
pathFromData | The file path, relative to working directory. See nkResources::ResourceManager for path naming convention. |
ContentLoadResultRenderQueue nkGraphics::ContentLoader::processRenderQueueSources | ( | nkMemory::StringView | sources | ) |
Loads a render queue declaration, from memory.
sources | The memory chunk to interpret. |
ContentLoadResultRenderQueue nkGraphics::ContentLoader::processRenderQueueTree | ( | nkExport::Node * | tree | ) |
Loads a render queue declaration, from an existing tree.
tree | The tree to interpret. |
ContentLoadResultCompositorNode nkGraphics::ContentLoader::appendCompositorNodeFromFile | ( | nkMemory::StringView | pathFromData, |
Compositor * | parent | ||
) |
Appends a node into a compositor, parsed from a file.
pathFromData | The path of the file to load, relative to the working directory. See nkResources::ResourceManager for path naming conventions. |
parent | The compositor to append the node to. |
ContentLoadResultCompositorNode nkGraphics::ContentLoader::appendCompositorNodeFromSources | ( | nkMemory::StringView | sources, |
Compositor * | parent | ||
) |
Appends a node into a compositor, parsed from a source.
sources | The sources to parse. |
parent | The compositor to append the node to. |
ContentLoadResultCompositorNode nkGraphics::ContentLoader::appendCompositorNodeFromTree | ( | nkExport::Node * | tree, |
Compositor * | parent | ||
) |
Appends a node into a compositor, parsed from a tree.
tree | The tree to get the compositor node from. |
parent | The compositor to append the node to. |