From ecfe35489c6dc4e6351584a2eca8b93b56dd4c9a Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Wed, 24 Jun 2015 11:40:23 +0800 Subject: [PATCH] fix clearcolor bug which has no effect --- cocos/base/CCDirector.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index 7ef479424c..6351c82d76 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -691,6 +691,9 @@ void Director::setDepthTest(bool on) void Director::setClearColor(const Color4F& clearColor) { _renderer->setClearColor(clearColor); + auto defaultFBO = experimental::FrameBuffer::getOrCreateDefaultFBO(_openGLView); + + if(defaultFBO) defaultFBO->setClearColor(clearColor); } static void GLToClipTransform(Mat4 *transformOut)