Mipmapped array textures

This commit is contained in:
Jack Andersen
2017-01-28 17:56:17 -10:00
parent 7bf2ad48a7
commit 80e93a8e38
5 changed files with 81 additions and 36 deletions

View File

@@ -49,8 +49,8 @@ public:
ITextureS* newStaticTexture(size_t width, size_t height, size_t mips, TextureFormat fmt,
const void* data, size_t sz);
ITextureSA* newStaticArrayTexture(size_t width, size_t height, size_t layers, TextureFormat fmt,
const void* data, size_t sz);
ITextureSA* newStaticArrayTexture(size_t width, size_t height, size_t layers, size_t mips,
TextureFormat fmt, const void* data, size_t sz);
ITextureD* newDynamicTexture(size_t width, size_t height, TextureFormat fmt);
ITextureR* newRenderTexture(size_t width, size_t height,
bool enableShaderColorBinding, bool enableShaderDepthBinding);

View File

@@ -220,8 +220,8 @@ struct IGraphicsDataFactory
newStaticTexture(size_t width, size_t height, size_t mips, TextureFormat fmt,
const void* data, size_t sz)=0;
virtual ITextureSA*
newStaticArrayTexture(size_t width, size_t height, size_t layers, TextureFormat fmt,
const void* data, size_t sz)=0;
newStaticArrayTexture(size_t width, size_t height, size_t layers, size_t mips,
TextureFormat fmt, const void* data, size_t sz)=0;
virtual ITextureD*
newDynamicTexture(size_t width, size_t height, TextureFormat fmt)=0;
virtual ITextureR*
@@ -367,12 +367,15 @@ public:
IGraphicsBufferD* newPoolBuffer(BufferUse use,
size_t stride, size_t count)
{
return m_factory->newPoolBuffer(m_pool, use, stride, count);
if (m_factory)
return m_factory->newPoolBuffer(m_pool, use, stride, count);
return nullptr;
}
void deletePoolBuffer(IGraphicsBufferD* buf)
{
m_factory->deletePoolBuffer(m_pool, buf);
if (m_factory)
m_factory->deletePoolBuffer(m_pool, buf);
}
};

View File

@@ -53,8 +53,8 @@ public:
ITextureS* newStaticTexture(size_t width, size_t height, size_t mips, TextureFormat fmt,
const void* data, size_t sz);
ITextureSA* newStaticArrayTexture(size_t width, size_t height, size_t layers, TextureFormat fmt,
const void* data, size_t sz);
ITextureSA* newStaticArrayTexture(size_t width, size_t height, size_t layers, size_t mips,
TextureFormat fmt, const void* data, size_t sz);
ITextureD* newDynamicTexture(size_t width, size_t height, TextureFormat fmt);
ITextureR* newRenderTexture(size_t width, size_t height,
bool enableShaderColorBinding, bool enableShaderDepthBinding);