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

Method copyFromFramebuffer

RenderSystems/GL/src/OgreGLHardwarePixelBuffer.cpp:358–375  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

356}
357//-----------------------------------------------------------------------------
358void GLTextureBuffer::copyFromFramebuffer(uint32 zoffset)
359{
360 mRenderSystem->_getStateCacheManager()->bindGLTexture(mTarget, mTextureID);
361 switch(mTarget)
362 {
363 case GL_TEXTURE_1D:
364 glCopyTexSubImage1D(mFaceTarget, mLevel, 0, 0, 0, mWidth);
365 break;
366 case GL_TEXTURE_2D:
367 case GL_TEXTURE_CUBE_MAP:
368 glCopyTexSubImage2D(mFaceTarget, mLevel, 0, 0, 0, 0, mWidth, mHeight);
369 break;
370 case GL_TEXTURE_3D:
371 case GL_TEXTURE_2D_ARRAY_EXT:
372 glCopyTexSubImage3D(mFaceTarget, mLevel, 0, 0, zoffset, 0, 0, mWidth, mHeight);
373 break;
374 }
375}
376//-----------------------------------------------------------------------------
377void GLTextureBuffer::blit(const HardwarePixelBufferSharedPtr &src, const Box &srcBox, const Box &dstBox)
378{

Callers 2

unbindMethod · 0.45
unbindMethod · 0.45

Calls 1

bindGLTextureMethod · 0.45

Tested by

no test coverage detected