| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsVulkanPrerequisites.h"
- #include "BsTextureManager.h"
- namespace bs
- {
- /** @addtogroup Vulkan
- * @{
- */
- /** Handles creation of Vulkan textures. */
- class VulkanTextureManager : public TextureManager
- {
- public:
- /** @copydoc TextureManager::getNativeFormat */
- PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage, bool hwGamma) override;
- protected:
- /** @copydoc TextureManager::createRenderTextureImpl */
- SPtr<RenderTexture> createRenderTextureImpl(const RENDER_TEXTURE_DESC& desc) override;
- };
- /** Handles creation of Vulkan textures. */
- class VulkanTextureCoreManager : public TextureCoreManager
- {
- public:
- /** @copydoc TextureCoreManager::onStartUp */
- void onStartUp() override;
- /** Returns a image view that can be used for shader read operations when no other image is bound. */
- VkImageView getDummyReadImageView(UINT32 deviceIdx) const;
- /** Returns a image view that can be used for shader storage operations when no other image is bound. */
- VkImageView getDummyStorageImageView(UINT32 deviceIdx) const;
- protected:
- /** @copydoc TextureCoreManager::createTextureInternal */
- SPtr<TextureCore> createTextureInternal(const TEXTURE_DESC& desc,
- const SPtr<PixelData>& initialData = nullptr, GpuDeviceFlags deviceMask = GDF_DEFAULT) override;
- /** @copydoc TextureCoreManager::createRenderTextureInternal */
- SPtr<RenderTextureCore> createRenderTextureInternal(const RENDER_TEXTURE_DESC_CORE& desc,
- UINT32 deviceIdx = 0) override;
- SPtr<VulkanTextureCore> mDummyReadTexture;
- SPtr<VulkanTextureCore> mDummyStorageTexture;
- };
- /** @} */
- }
|