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

Method bindRenderTarget

RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp:1402–1418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1400 }
1401
1402 void GLES2RenderSystem::bindRenderTarget(RenderTarget* target)
1403 {
1404 if(auto fbo = dynamic_cast<GLRenderTarget*>(target)->getFBO())
1405 {
1406 fbo->bind(true);
1407 }
1408 else
1409 {
1410 // Non-multisampled screen buffer is FBO #1 on iOS, multisampled is yet another,
1411 // so give the target ability to influence decision which FBO to use
1412 GLuint mainfbo = 0;
1413#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
1414 target->getCustomAttribute("GLFBO", &mainfbo);
1415#endif
1416 OGRE_CHECK_GL_ERROR(glBindFramebuffer(GL_FRAMEBUFFER, mainfbo));
1417 }
1418 }
1419
1420 void GLES2RenderSystem::_setRenderTarget(RenderTarget *target)
1421 {

Callers

nothing calls this directly

Calls 2

bindMethod · 0.45
getCustomAttributeMethod · 0.45

Tested by

no test coverage detected