mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
add debug reportingfor cubemap arrays, and correct transcription flaw
This commit is contained in:
parent
ada1e83de2
commit
aafbb7bfba
1 changed files with 8 additions and 1 deletions
|
|
@ -340,6 +340,13 @@ void GFXGLCubemapArray::init(GFXCubemapHandle *cubemaps, const U32 cubemapCount)
|
||||||
for (U32 i = 0; i < cubemapCount; i++)
|
for (U32 i = 0; i < cubemapCount; i++)
|
||||||
{
|
{
|
||||||
GFXGLCubemap* glTex = static_cast<GFXGLCubemap*>(cubemaps[i].getPointer());
|
GFXGLCubemap* glTex = static_cast<GFXGLCubemap*>(cubemaps[i].getPointer());
|
||||||
|
//yes checking the first one(cubemap at index 0) is pointless but saves a further if statement
|
||||||
|
if (cubemaps[i]->getSize() != mSize || cubemaps[i]->getFormat() != mFormat || cubemaps[i]->getMipMapLevels() != mMipMapLevels)
|
||||||
|
{
|
||||||
|
Con::printf("Trying to add an invalid Cubemap to a CubemapArray");
|
||||||
|
//destroy array here first
|
||||||
|
AssertFatal(false, "GFXD3D11CubemapArray::initStatic - invalid cubemap");
|
||||||
|
}
|
||||||
for (U32 face = 0; face < 6; face++)
|
for (U32 face = 0; face < 6; face++)
|
||||||
{
|
{
|
||||||
for (U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
for (U32 currentMip = 0; currentMip < mMipMapLevels; currentMip++)
|
||||||
|
|
@ -368,7 +375,7 @@ void GFXGLCubemapArray::init(GFXCubemapHandle *cubemaps, const U32 cubemapCount)
|
||||||
//Just allocate the cubemap array but we don't upload any data
|
//Just allocate the cubemap array but we don't upload any data
|
||||||
void GFXGLCubemapArray::init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format)
|
void GFXGLCubemapArray::init(const U32 cubemapCount, const U32 cubemapFaceSize, const GFXFormat format)
|
||||||
{
|
{
|
||||||
setCubeTexSize(cubemapCount);
|
setCubeTexSize(cubemapFaceSize);
|
||||||
mFormat = format;
|
mFormat = format;
|
||||||
mNumCubemaps = cubemapCount;
|
mNumCubemaps = cubemapCount;
|
||||||
const bool isCompressed = ImageUtil::isCompressedFormat(mFormat);
|
const bool isCompressed = ImageUtil::isCompressedFormat(mFormat);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue