Jelajahi Sumber

Added create method to MultiRendererTextureCore

marco.bellan 9 tahun lalu
induk
melakukan
5c804ff831

+ 3 - 0
Source/BansheeCore/Include/BsMultiRenderTexture.h

@@ -121,6 +121,9 @@ namespace BansheeEngine
 		/** Returns properties that describe the render texture. */
 		/** Returns properties that describe the render texture. */
 		const MultiRenderTextureProperties& getProperties() const;
 		const MultiRenderTextureProperties& getProperties() const;
 
 
+		/** @copydoc	TextureManager::createMultiRenderTexture(const MULTI_RENDER_TEXTURE_DESC&) */
+		static SPtr<MultiRenderTextureCore> create(const MULTI_RENDER_TEXTURE_CORE_DESC& desc);
+
 	protected:
 	protected:
 		MultiRenderTextureCore(const MULTI_RENDER_TEXTURE_CORE_DESC& desc);
 		MultiRenderTextureCore(const MULTI_RENDER_TEXTURE_CORE_DESC& desc);
 
 

+ 5 - 0
Source/BansheeCore/Source/BsMultiRenderTexture.cpp

@@ -127,6 +127,11 @@ namespace BansheeEngine
 		return static_cast<const MultiRenderTextureProperties&>(getPropertiesInternal());
 		return static_cast<const MultiRenderTextureProperties&>(getPropertiesInternal());
 	}
 	}
 
 
+	SPtr<MultiRenderTextureCore> MultiRenderTextureCore::create(const MULTI_RENDER_TEXTURE_CORE_DESC& desc)
+	{
+		return TextureCoreManager::instance().createMultiRenderTexture(desc);
+	}
+
 	void MultiRenderTextureCore::throwIfBuffersDontMatch() const
 	void MultiRenderTextureCore::throwIfBuffersDontMatch() const
 	{
 	{
 		SPtr<TextureView> firstSurfaceDesc = nullptr;
 		SPtr<TextureView> firstSurfaceDesc = nullptr;