mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Update gfxD3D11Cubemap.cpp
put arraySize check back in
This commit is contained in:
parent
ef856e23fa
commit
c476b292a6
1 changed files with 6 additions and 0 deletions
|
|
@ -257,6 +257,12 @@ void GFXD3D11CubemapArray::_init(U32 cubemapCount, U32 size, GFXFormat format) {
|
||||||
desc.MiscFlags = miscFlags;
|
desc.MiscFlags = miscFlags;
|
||||||
desc.CPUAccessFlags = 0;
|
desc.CPUAccessFlags = 0;
|
||||||
|
|
||||||
|
if (desc.ArraySize > D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION)
|
||||||
|
{
|
||||||
|
AssertFatal(false, avar("CubemapArray size exceeds maximum array size of %d", D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
HRESULT hr = D3D11DEVICE->CreateTexture2D(&desc, NULL, &mTexture);
|
HRESULT hr = D3D11DEVICE->CreateTexture2D(&desc, NULL, &mTexture);
|
||||||
AssertFatal(SUCCEEDED(hr), "GFXD3D11CubemapArray::_init - CreateTexture2D failed");
|
AssertFatal(SUCCEEDED(hr), "GFXD3D11CubemapArray::_init - CreateTexture2D failed");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue