| 655 | } |
| 656 | |
| 657 | void GLES2RenderSystem::_setTexture(size_t stage, bool enabled, const TexturePtr &texPtr) |
| 658 | { |
| 659 | mStateCacheManager->activateGLTextureUnit(stage); |
| 660 | if (enabled) |
| 661 | { |
| 662 | GLES2TexturePtr tex = static_pointer_cast<GLES2Texture>(texPtr); |
| 663 | |
| 664 | mCurTexMipCount = 0; |
| 665 | |
| 666 | // Note used |
| 667 | tex->touch(); |
| 668 | mTextureTypes[stage] = tex->getGLES2TextureTarget(); |
| 669 | mCurTexMipCount = tex->getNumMipmaps(); |
| 670 | |
| 671 | mStateCacheManager->bindGLTexture(mTextureTypes[stage], tex->getGLID()); |
| 672 | } |
| 673 | else |
| 674 | { |
| 675 | // Bind zero texture |
| 676 | mStateCacheManager->bindGLTexture(GL_TEXTURE_2D, 0); |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | static int getTextureAddressingMode(TextureAddressingMode tam, bool hasBorderClamp = true) |
| 681 | { |
nothing calls this directly
no test coverage detected