![]() |
OGRE-Next 3.0.0
Object-Oriented Graphics Rendering Engine
|
#include <OgreNULLTextureGpuManager.h>
Inheritance diagram for Ogre::NULLTextureGpuManager:Public Member Functions | |
| NULLTextureGpuManager (VaoManager *vaoManager, RenderSystem *renderSystem) | |
| ~NULLTextureGpuManager () override | |
| TextureGpu * | createTextureGpuWindow () |
Public Member Functions inherited from Ogre::TextureGpuManager | |
| TextureGpuManager (VaoManager *vaoManager, RenderSystem *renderSystem) | |
| ~TextureGpuManager () override | |
| void | _queueDownloadToRam (TextureGpu *texture, bool resyncOnly) |
| void | _releaseSlotFromTexture (TextureGpu *texture) |
| Must be called from main thread. | |
| void | _removeMetadataCacheEntry (TextureGpu *texture) |
| void | _reserveSlotForTexture (TextureGpu *texture) |
| Must be called from main thread. | |
| void | _scheduleTransitionTo (TextureGpu *texture, GpuResidency::GpuResidency targetResidency, Image2 *image, bool autoDeleteImage, bool reuploadOnly, bool bSkipMultiload) |
| void | _scheduleUpdate (TextureGpu *texture, uint32 filters, Image2 *image, bool autoDeleteImage, bool skipMetadataCache=false, uint32 sliceOrDepth=std::numeric_limits< uint32 >::max()) |
| void | _setIgnoreScheduledTasks (bool ignoreSchedTasks) |
| When true we will ignore all tasks in mScheduledTasks and execute transitions immediately Caller is responsible for ensuring this is safe to do. | |
| bool | _update (bool syncWithWorkerThread) |
| Returns true if there is no more streaming work to be done yet (if false, calls to _update could be needed once again) See waitForStreamingCompletion. | |
| void | _updateMetadataCache (TextureGpu *texture) |
| void | _updateStreaming () |
| unsigned long | _updateStreamingWorkerThread (ThreadHandle *threadHandle) |
| unsigned long | _updateTextureMultiLoadWorkerThread (ThreadHandle *threadHandle) |
| Implements multiload. | |
| void | _waitFor (TextureGpu *texture, bool metadataOnly) |
| Do not use directly. See TextureGpu::waitForMetadata & TextureGpu::waitForDataReady. | |
| void | _waitForPendingGpuToCpuSyncs (TextureGpu *texture) |
| Do not use directly. See TextureGpu::waitForPendingSyncs. | |
| virtual bool | checkSupport (PixelFormatGpu format, TextureTypes::TextureTypes textureType, uint32 textureFlags) const |
| Checks if the given format with the texture flags combination is supported. | |
| AsyncTextureTicket * | createAsyncTextureTicket (uint32 width, uint32 height, uint32 depthOrSlices, TextureTypes::TextureTypes textureType, PixelFormatGpu pixelFormatFamily) |
| Creates an AsyncTextureTicket that can be used to download data GPU -> CPU from a TextureGpu. | |
| TextureGpu * | createOrRetrieveTexture (const String &name, const String &aliasName, GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, CommonTextureTypes::CommonTextureTypes type, const String &resourceGroup=BLANKSTRING, uint32 poolId=0) |
| Helper function to call createOrRetrieveTexture with common parameters used for 2D diffuse textures loaded from file. | |
| TextureGpu * | createOrRetrieveTexture (const String &name, const String &aliasName, GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, uint32 textureFlags, TextureTypes::TextureTypes initialType, const String &resourceGroup=BLANKSTRING, uint32 filters=0, uint32 poolId=0) |
| TextureGpu * | createOrRetrieveTexture (const String &name, GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, CommonTextureTypes::CommonTextureTypes type, const String &resourceGroup=BLANKSTRING, uint32 poolId=0) |
| TextureGpu * | createOrRetrieveTexture (const String &name, GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, uint32 textureFlags, TextureTypes::TextureTypes initialType, const String &resourceGroup=BLANKSTRING, uint32 filters=0, uint32 poolId=0) |
| TextureGpu * | createTexture (const String &name, const String &aliasName, GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, uint32 textureFlags, TextureTypes::TextureTypes initialType, const String &resourceGroup=BLANKSTRING, uint32 filters=0, uint32 poolId=0) |
| TextureGpu * | createTexture (const String &name, GpuPageOutStrategy::GpuPageOutStrategy pageOutStrategy, uint32 textureFlags, TextureTypes::TextureTypes initialType, const String &resourceGroup=BLANKSTRING, uint32 filters=0, uint32 poolId=0) |
| void | destroyAllAsyncTextureTicket () |
| void | destroyAsyncTextureTicket (AsyncTextureTicket *ticket) |
| void | destroyTexture (TextureGpu *texture) |
| Destroys a texture. | |
| void | dumpMemoryUsage (Log *log, Ogre::uint32 mask=ResidencyMask::All) const |
| void | dumpStats () const |
| void | exportTextureMetadataCache (String &outJson) |
| const String * | findAliasNameStr (IdString idName) const |
| This function CAN be called from any thread. | |
| const String * | findResourceGroupStr (IdString idName) const |
| This function CAN be called from any thread. | |
| const String * | findResourceNameStr (IdString idName) const |
| This function CAN be called from any thread. | |
| TextureGpu * | findTextureNoThrow (IdString name) const |
| const BudgetEntryVec & | getBudget () const |
| DefaultMipmapGen::DefaultMipmapGen | getDefaultMipmapGeneration () const |
| DefaultMipmapGen::DefaultMipmapGen | getDefaultMipmapGenerationCubemaps () const |
| const ResourceEntryMap & | getEntries () const |
| uint64 | getLoadRequestsCounter () const |
| Calling waitForStreamingCompletion before Root::renderOneFrame should guarantee the render is perfect. | |
| void | getMemoryStats (size_t &outTextureBytesCpu, size_t &outTextureBytesGpu, size_t &outUsedStagingTextureBytes, size_t &outAvailableStagingTextureBytes) |
| bool | getProfileLoadingTime () const |
| RenderSystem * | getRenderSystem () const |
| StagingTexture * | getStagingTexture (uint32 width, uint32 height, uint32 depth, uint32 slices, PixelFormatGpu pixelFormat, size_t minConsumptionRatioThreshold=25u) |
| Creates a StagingTexture which is required to upload data CPU -> GPU into a TextureGpu. | |
| VaoManager * | getVaoManager () const |
| bool | hasPoolId (uint32 poolId, uint32 width, uint32 height, uint8 numMipmaps, PixelFormatGpu pixelFormat) const |
| bool | hasTextureResource (const String &aliasName, const String &resourceGroup) const |
| Returns true if a texture with the given aliasName exists, or if a ResourceGroupListener provides such texture, or if such texture exists (i.e. | |
| void | importTextureMetadataCache (const String &filename, const char *jsonString, bool bCreateReservedPools) |
| bool | isDoneStreaming () const |
| Returns true if we're done loading all textures based on the return value of the last call to TextureGpuManager::_update and whether new tasks have been scheduled since then. | |
| void | notifyTextureChanged (TextureGpu *texture, TextureGpuListener::Reason reason, void *extraData) override |
| void | removeStagingTexture (StagingTexture *stagingTexture) |
| TextureGpu * | reservePoolId (uint32 poolId, uint32 width, uint32 height, uint32 numSlices, uint8 numMipmaps, PixelFormatGpu pixelFormat) |
| Reserves and preallocates a pool with the given parameters Returns the master texture that owns the pool. | |
| void | saveTexture (TextureGpu *texture, const String &folderPath, set< String >::type &savedTextures, bool saveOitd, bool saveOriginal, HlmsTextureExportListener *listener) |
| void | setDefaultMipmapGeneration (DefaultMipmapGen::DefaultMipmapGen defaultMipmapGen, DefaultMipmapGen::DefaultMipmapGen defaultMipmapGenCubemaps) |
| Whether to use HW or SW mipmap generation when specifying TextureFilter::TypeGenerateDefaultMipmaps for loading files from textures. | |
| void | setMultiLoadPool (uint32 numThreads) |
| OgreNext always performs background streaming to load textures in a worker thread. | |
| void | setProfileLoadingTime (bool bProfile) |
| When enabled, we will profile the time it takes a texture to go from Resident to Ready and Log it. | |
| void | setStagingTextureMaxBudgetBytes (size_t stagingTextureMaxBudgetBytes) |
| At a high level, texture loading works like this: | |
| void | setTextureGpuManagerListener (TextureGpuManagerListener *listener) |
| Sets a new listener. | |
| void | setTrylockMutexFailureLimit (uint32 tryLockFailureLimit) |
| The main thread tries to acquire a lock from the background thread, do something very quick, and release it. | |
| void | setWorkerThreadMaxPerStagingTextureRequestBytes (size_t maxPerStagingTextureRequestBytes) |
| The worker thread tracks how many data it is loading so the Main thread can request additional StagingTextures if necessary. | |
| void | setWorkerThreadMaxPreloadBytes (size_t maxPreloadBytes) |
| The worker thread first loads the texture from disk to RAM (aka "preload", and then copies from RAM to StagingTexture. | |
| void | setWorkerThreadMinimumBudget (const BudgetEntryVec &budget, uint32 maxSplitResolution=0) |
| Background streaming works by having a bunch of preallocated StagingTextures so we're ready to start uploading as soon as we see a request to load a texture from file. | |
| void | shutdown () |
| void | waitForStreamingCompletion () |
| Blocks main thread until all pending textures are fully loaded. | |
Public Member Functions inherited from Ogre::TextureGpuListener | |
| virtual | ~TextureGpuListener () |
| virtual bool | shouldStayLoaded (TextureGpu *texture) |
| Return true if this TextureGpu should likely stay loaded or else graphical changes could occur. | |
Additional Inherited Members | |
Public Types inherited from Ogre::TextureGpuManager | |
| typedef vector< BudgetEntry >::type | BudgetEntryVec |
| typedef map< IdString, MetadataCacheEntry >::type | MetadataCacheMap |
| typedef map< IdString, ResourceEntry >::type | ResourceEntryMap |
Public Types inherited from Ogre::TextureGpuListener | |
| enum | Reason { Unknown , FromStorageToSysRam , FromSysRamToStorage , GainedResidency , LostResidency , PoolTextureSlotChanged , ResidentToSysRamSync , MetadataCacheOutOfDate , ExceptionThrown , FsaaSettingAlteredByApi , ReadyForRendering , Deleted } |
Public Attributes inherited from Ogre::TextureGpuManager | |
| bool | mIgnoreSRgbPreference |
| While true, calls to createTexture & createOrRetrieveTexture will ignore and unset the TextureFlags::PrefersLoadingFromFileAsSRGB flag. | |
| Ogre::NULLTextureGpuManager::NULLTextureGpuManager | ( | VaoManager * | vaoManager, |
| RenderSystem * | renderSystem ) |
|
override |
| TextureGpu * Ogre::NULLTextureGpuManager::createTextureGpuWindow | ( | ) |