MCPcopy Create free account
hub / github.com/OGRECave/ogre / _setTexture

Method _setTexture

RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp:657–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

getGLES2TextureTargetMethod · 0.80
getNumMipmapsMethod · 0.80
activateGLTextureUnitMethod · 0.45
touchMethod · 0.45
bindGLTextureMethod · 0.45

Tested by

no test coverage detected