@@ -19,11 +19,6 @@ namespace Babylon::Plugins
19
19
Info info;
20
20
GetInfo (ptr, overrideFormat, info);
21
21
22
- // if (info.Width != m_info.Width || info.Height != m_info.Height || info.MipLevels != m_info.MipLevels)
23
- // {
24
- // return false;
25
- // }
26
-
27
22
DEBUG_TRACE (" ExternalTexture [0x%p] Update %d x %d %d mips" , this , int (info.Width ), int (info.Height ), int (info.MipLevels ));
28
23
29
24
m_info = info;
@@ -76,8 +71,8 @@ namespace Babylon::Plugins
76
71
[&context, &runtime, deferred = std::move (deferred), impl = m_impl]() {
77
72
// REVIEW: The bgfx texture handle probably needs to be an RAII object to make sure it gets clean up during the asynchrony.
78
73
// For example, if any of the schedulers/dispatches below don't fire, then the texture handle will leak.
79
- bgfx::TextureHandle handle = bgfx::createTexture2D (impl->Width (), impl->Height (), impl->HasMips (), 1 , impl->Format (), impl->Flags ());
80
- DEBUG_TRACE (" ExternalTexture [0x%p] create %d x %d %d mips. Format : %d Flags : %d. (bgfx handle id %d)" , impl.get (), int (impl->Width ()), int (impl->Height ()), int (impl->HasMips ()), int (impl->Format ()), int (impl->Flags ()), int (handle.idx ));
74
+ bgfx::TextureHandle handle = bgfx::createTexture2D (impl->Width (), impl->Height (), impl->HasMips (), impl-> NumLayers () , impl->Format (), impl->Flags ());
75
+ DEBUG_TRACE (" ExternalTexture [0x%p] create %d x %d %d mips %d layers . Format : %d Flags : %d. (bgfx handle id %d)" , impl.get (), int (impl->Width ()), int (impl->Height ()), int (impl->HasMips ()), int (impl-> NumLayers ()), int (impl->Format ()), int (impl->Flags ()), int (handle.idx ));
81
76
if (!bgfx::isValid (handle))
82
77
{
83
78
DEBUG_TRACE (" ExternalTexture [0x%p] is not valid" , impl.get ());
391B
0 commit comments