Skip to content

Commit 1e3e2fa

Browse files
TextureBase: fixed issue with creating default views for dummy OpenGL textures
1 parent 4ba7c07 commit 1e3e2fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Graphics/GraphicsEngine/include/TextureBase.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ class TextureBase : public DeviceObjectBase<typename EngineImplTraits::TextureIn
183183
{
184184
VERIFY(m_pDefaultViews == nullptr, "Default views have already been initialized");
185185

186+
if (this->m_Desc.Format == TEX_FORMAT_UNKNOWN)
187+
{
188+
// Happens when creating dummy OpenGL textures
189+
return;
190+
}
191+
186192
const Uint32 NumDefaultViews = GetNumDefaultViews();
187193
if (NumDefaultViews == 0)
188194
return;

0 commit comments

Comments
 (0)