From df09bef567b22c8546a778bab1fb7bdd5bc12d8c Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Fri, 29 May 2015 10:00:48 +0800 Subject: [PATCH] use a different size to create fbo --- tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp index 0765db7d4c..5d2d2c3fa9 100644 --- a/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp +++ b/tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp @@ -1432,7 +1432,8 @@ void CameraFrameBufferObjectTest::onEnter() { auto sizeInpixels = Director::getInstance()->getWinSizeInPixels(); auto size = Director::getInstance()->getWinSize(); - auto fbo = FrameBufferObject::create(1, sizeInpixels.width, sizeInpixels.height); + auto fboSize = Size(sizeInpixels.width * 1, sizeInpixels.height * 1.5); + auto fbo = FrameBufferObject::create(1, fboSize.width, fboSize.height); CameraBaseTest::onEnter(); //auto sprite = Sprite::createWithTexture(fbo); @@ -1448,8 +1449,8 @@ void CameraFrameBufferObjectTest::onEnter() // sprite->runAction(RepeatForever::create(animate)); //} //sprite->setPosition(Vec2(100,100)); - auto rt = RenderTarget::create(sizeInpixels.width, sizeInpixels.height); - auto rtDS = RenderTargetDepthStencil::create(sizeInpixels.width, sizeInpixels.height); + auto rt = RenderTarget::create(fboSize.width, fboSize.height); + auto rtDS = RenderTargetDepthStencil::create(fboSize.width, fboSize.height); fbo->AttachRenderTarget(rt); fbo->AttachDepthStencilTarget(rtDS); auto sprite = Sprite::createWithTexture(fbo->getRenderTarget()->getTexture());