OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::TextureFilter::GenerateHwMipmaps Class Reference

#include <OgreTextureFilters.h>

+ Inheritance diagram for Ogre::TextureFilter::GenerateHwMipmaps:

Public Member Functions

 GenerateHwMipmaps ()
 
void _executeSerial (TextureGpu *texture) override
 Gets executed after the TextureGpu is fully resident and fully loaded. More...
 
void _executeStreaming (Image2 &image, TextureGpu *texture) override
 Gets executed from worker thread, right after the Image was loaded from file and we're done setting the metadata to the Texture. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 

Static Public Member Functions

static void createFilters (uint32 filters, FilterBaseArray &outFilters, const TextureGpu *texture, const Image2 &image, bool toSysRam)
 
static void destroyFilters (FilterBaseArray &inOutFilters)
 
static void simulateFiltersForCacheConsistency (uint32 filters, const Image2 &image, const TextureGpuManager *textureGpuManager, uint8 &inOutNumMipmaps, PixelFormatGpu &inOutPixelFormat)
 Simulates as if the given filters were applied, producing the resulting number mipmaps & PixelFormat. More...
 

Constructor & Destructor Documentation

◆ GenerateHwMipmaps()

Ogre::TextureFilter::GenerateHwMipmaps::GenerateHwMipmaps ( )
inline

Member Function Documentation

◆ _executeSerial()

void Ogre::TextureFilter::GenerateHwMipmaps::_executeSerial ( TextureGpu texture)
overridevirtual

Gets executed after the TextureGpu is fully resident and fully loaded.

(except for the steps this filter is supposed to do)

Reimplemented from Ogre::TextureFilter::FilterBase.

◆ _executeStreaming()

void Ogre::TextureFilter::GenerateHwMipmaps::_executeStreaming ( Image2 image,
TextureGpu texture 
)
overridevirtual

Gets executed from worker thread, right after the Image was loaded from file and we're done setting the metadata to the Texture.

Beware the texture may or may not have been transitioned to resident yet (it's likely not resident, but 2nd face and onwards of cubemaps will be resident)

Reimplemented from Ogre::TextureFilter::FilterBase.

◆ createFilters()

static void Ogre::TextureFilter::FilterBase::createFilters ( uint32  filters,
FilterBaseArray outFilters,
const TextureGpu texture,
const Image2 image,
bool  toSysRam 
)
staticinherited

◆ destroyFilters()

static void Ogre::TextureFilter::FilterBase::destroyFilters ( FilterBaseArray inOutFilters)
staticinherited

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

◆ simulateFiltersForCacheConsistency()

static void Ogre::TextureFilter::FilterBase::simulateFiltersForCacheConsistency ( uint32  filters,
const Image2 image,
const TextureGpuManager textureGpuManager,
uint8 inOutNumMipmaps,
PixelFormatGpu inOutPixelFormat 
)
staticinherited

Simulates as if the given filters were applied, producing the resulting number mipmaps & PixelFormat.

When a TextureGpu transitions OnStorage -> Resident, we use the metadata cache and later compare if the cache was up to date. To check if it's up to date, we need to know the final number of mipmaps and final pixel format. Thus this function is needed in this case.

However then transitioning OnStorage -> OnSystemRam, the cache is not used, because A. the metadata is not needed (it cannot optimize the shader) and B. the number of mipmaps may not match. This can happen because the HW mipmap filter won't be run. This function is not needed in such case.

When transitioning OnSystemRam -> Resident, we already have all the metadata except for the mipmaps, as the HW mipmap filter will be run. Thus we need this function so we can set the number of mipmaps to the final value, immediately transition to Resident, and start loading the image on the background thread without ping-pong.


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