-----------------------------------------------------------------------------
| 655 | } |
| 656 | //----------------------------------------------------------------------------- |
| 657 | Vector4f AutoParamDataSource::getTextureSize(size_t index) const |
| 658 | { |
| 659 | Vector4f size = Vector4f(1,1,1,1); |
| 660 | |
| 661 | if (index < mCurrentPass->getNumTextureUnitStates()) |
| 662 | { |
| 663 | const TexturePtr& tex = mCurrentPass->getTextureUnitState( |
| 664 | static_cast<unsigned short>(index))->_getTexturePtr(); |
| 665 | if (tex) |
| 666 | { |
| 667 | size[0] = static_cast<float>(tex->getWidth()); |
| 668 | size[1] = static_cast<float>(tex->getHeight()); |
| 669 | size[2] = static_cast<float>(tex->getDepth()); |
| 670 | size[3] = static_cast<float>(tex->getNumMipmaps()); |
| 671 | } |
| 672 | } |
| 673 | |
| 674 | return size; |
| 675 | } |
| 676 | //----------------------------------------------------------------------------- |
| 677 | Vector4f AutoParamDataSource::getInverseTextureSize(size_t index) const |
| 678 | { |
no test coverage detected