From 81c063c4275dc22998e33d7027107d8a2ab8224e Mon Sep 17 00:00:00 2001 From: halx99 Date: Mon, 15 Nov 2021 17:49:46 +0800 Subject: [PATCH] Sets default render state when restart director --- cocos/base/CCDirector.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index 7d0a2d80aa..d078800df8 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -1059,6 +1059,8 @@ void Director::restartDirector() ScriptEvent scriptEvent(kRestartGame, nullptr); ScriptEngineManager::sendEventToLua(scriptEvent); #endif + + setGLDefaultValues(); } void Director::setNextScene()