----------------------------------------------------------------------------- Set cube texture array -----------------------------------------------------------------------------
| 730 | // Set cube texture array |
| 731 | //----------------------------------------------------------------------------- |
| 732 | void GFXDevice::setCubeArrayTexture(U32 stage, GFXCubemapArray *cubemapArray) |
| 733 | { |
| 734 | AssertFatal(stage < getNumSamplers(), avar("GFXDevice::setTexture - out of range stage! %i>%i", stage, getNumSamplers())); |
| 735 | |
| 736 | if (mTexType[stage] == GFXTDT_CubeArray && |
| 737 | ((mTextureDirty[stage] && mNewCubemapArray[stage].getPointer() == cubemapArray) || |
| 738 | (!mTextureDirty[stage] && mCurrentCubemapArray[stage].getPointer() == cubemapArray))) |
| 739 | return; |
| 740 | |
| 741 | mStateDirty = true; |
| 742 | mTexturesDirty = true; |
| 743 | mTextureDirty[stage] = true; |
| 744 | |
| 745 | mNewCubemapArray[stage] = cubemapArray; |
| 746 | mTexType[stage] = GFXTDT_CubeArray; |
| 747 | |
| 748 | // Clear out textures |
| 749 | mNewTexture[stage] = NULL; |
| 750 | mCurrentTexture[stage] = NULL; |
| 751 | mNewCubemap[stage] = NULL; |
| 752 | mCurrentCubemap[stage] = NULL; |
| 753 | mNewTextureArray[stage] = NULL; |
| 754 | mCurrentTextureArray[stage] = NULL; |
| 755 | } |
| 756 | |
| 757 | //----------------------------------------------------------------------------- |
| 758 | // Set texture array |
no test coverage detected