mirror of https://github.com/axmolengine/axmol.git
fix transition scene stencil buffer
This commit is contained in:
parent
840f311f5c
commit
dffdef1118
|
@ -1278,7 +1278,7 @@ void TransitionCrossFade::onEnter()
|
|||
LayerColor* layer = LayerColor::create(color);
|
||||
|
||||
// create the first render texture for inScene
|
||||
RenderTexture* inTexture = RenderTexture::create((int)size.width, (int)size.height);
|
||||
RenderTexture* inTexture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8);
|
||||
|
||||
if (nullptr == inTexture)
|
||||
{
|
||||
|
@ -1295,7 +1295,7 @@ void TransitionCrossFade::onEnter()
|
|||
inTexture->end();
|
||||
|
||||
// create the second render texture for outScene
|
||||
RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height);
|
||||
RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8);
|
||||
outTexture->getSprite()->setAnchorPoint( Vec2(0.5f,0.5f) );
|
||||
outTexture->setPosition(size.width/2, size.height/2);
|
||||
outTexture->setAnchorPoint( Vec2(0.5f,0.5f) );
|
||||
|
|
|
@ -71,7 +71,7 @@ void TransitionProgress::onEnter()
|
|||
Size size = Director::getInstance()->getWinSize();
|
||||
|
||||
// create the second render texture for outScene
|
||||
RenderTexture *texture = RenderTexture::create((int)size.width, (int)size.height);
|
||||
RenderTexture *texture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8);
|
||||
texture->getSprite()->setAnchorPoint(Vec2(0.5f,0.5f));
|
||||
texture->setPosition(size.width/2, size.height/2);
|
||||
texture->setAnchorPoint(Vec2(0.5f,0.5f));
|
||||
|
|
Loading…
Reference in New Issue