既然是opengl渲染的,那么初始化的颜色一定是用gl函数处理的,如下
[cpp]
glClearColor(0.0f,0.0f,1.0f);
搜索之,找到一个
[cpp]
void CCDirector::setGLDefaultValues(void)
{
// This method SHOULD be called only after openGLView_ was initialized
CCAssert(m_pobOpenGLView,"opengl view should not be null");
setAlphaBlending(true);
// XXX: Fix me,should enable/disable depth test according the depth format as cocos2d-iphone did
// [self setDepthTest: view_.depthFormat];
setDepthTest(true);
setProjection(m_eProjection);
// 这里设置默认颜色
glClearColor(0.0f,51); font-family:宋体; font-size:14px">
// glClearColor(255.0f,255.0f,51); font-family:宋体; font-size:14px">
}
void CCDirector::setGLDefaultValues(void)
{
// This method SHOULD be called only after openGLView_ was initialized
setAlphaBlending(true);
// [self setDepthTest: view_.depthFormat];
setDepthTest(true);
setProjection(m_eProjection);
// 这里设置默认颜色
}
底下修改为白色。
原文链接:https://www.f2er.com/cocos2dx/339633.html