XII Release 0.1.0
Loading...
Searching...
No Matches
xiiTextureResourceLoader Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <TextureLoader.h>

Inheritance diagram for xiiTextureResourceLoader:
[legend]

Classes

struct  LoadedData

Public Member Functions

virtual xiiResourceLoadData OpenDataStream (const xiiResource *pResource) override
virtual void CloseDataStream (const xiiResource *pResource, const xiiResourceLoadData &loaderData) override
virtual bool IsResourceOutdated (const xiiResource *pResource) const override

Static Public Member Functions

static xiiResult LoadTexFile (xiiStreamReader &inout_stream, LoadedData &ref_data)
static void WriteTextureLoadStream (xiiStreamWriter &inout_stream, const LoadedData &data)

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

Member Function Documentation

◆ CloseDataStream()

void xiiTextureResourceLoader::CloseDataStream ( const xiiResource * pResource,
const xiiResourceLoadData & loaderData )
overridevirtual

This function is called when the resource has been updated with the data from the resource loader and the loader can deallocate any temporary memory.

Implements xiiResourceTypeLoader.

◆ IsResourceOutdated()

bool xiiTextureResourceLoader::IsResourceOutdated ( const xiiResource * pResource) const
overridevirtual

If this function returns true, a resource is unloaded and loaded again to update its content.

Call xiiResource::GetLoadedFileModificationTime() to query the file modification time that was returned through xiiResourceLoadData::m_LoadedFileModificationDate.

Reimplemented from xiiResourceTypeLoader.

◆ OpenDataStream()

xiiResourceLoadData xiiTextureResourceLoader::OpenDataStream ( const xiiResource * pResource)
overridevirtual

Override this function to implement the resource loading.

This function should take the information from pResource, e.g. which file to load, and do the loading work. It should allocate temporary storage for the loaded data and encode it in a memory stream, such that the resource can read all necessary information from the stream.

See also
xiiResourceLoadData

Implements xiiResourceTypeLoader.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Textures/TextureLoader.h
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Textures/Implementation/TextureLoader.cpp