#20571·cocos2d-x

Still show black when setting glclearColor(0 ,0 , 0, 0) in Win32

Author: 0xCreoCreated Aug 18, 2020Updated May 22, 2025
  • cocos2d-x version: 4.0
  • devices test on:
  • developing environments
    • VS version: Visual Studio2019

Steps to Reproduce:

  1. director->setAnimationInterval(1.0f / 60); #add director->setClearColor(cocos2d::Color4F(1.0f, 1.0f, 1.0f, 0.0f));
  2. When setting alpha channel to 0.0, I expect to see a transparent background. However, it is still black. Is there any mistake when I set director?