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

#include <OgreTextureFilters.h>

+ Inheritance diagram for Ogre::TextureFilter::FilterBase:

Public Member Functions

virtual ~FilterBase ()
 
virtual void _executeSerial (TextureGpu *texture)
 Gets executed after the TextureGpu is fully resident and fully loaded. More...
 
virtual void _executeStreaming (Image2 &image, TextureGpu *texture)
 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

◆ ~FilterBase()

virtual Ogre::TextureFilter::FilterBase::~FilterBase ( )
virtual

Member Function Documentation

◆ _executeSerial()

virtual void Ogre::TextureFilter::FilterBase::_executeSerial ( TextureGpu texture)
inlinevirtual

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

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

Reimplemented in Ogre::TextureFilter::GenerateHwMipmaps.

◆ _executeStreaming()

virtual void Ogre::TextureFilter::FilterBase::_executeStreaming ( Image2 image,
TextureGpu texture 
)
inlinevirtual

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 in Ogre::TextureFilter::LeaveChannelR, Ogre::TextureFilter::PrepareForNormalMapping, Ogre::TextureFilter::GenerateHwMipmaps, and Ogre::TextureFilter::GenerateSwMipmaps.

◆ createFilters()

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

◆ destroyFilters()

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

◆ 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 
)
static

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: