mirror of https://github.com/axmolengine/axmol.git
improve the perfermance of clear background for camera
This commit is contained in:
parent
fbe49f538d
commit
384041a950
|
@ -396,7 +396,7 @@ void Camera::clearBackground(float depth)
|
||||||
quad.tr.texCoords = Tex2F(1,1);
|
quad.tr.texCoords = Tex2F(1,1);
|
||||||
|
|
||||||
auto shader = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_CAMERA_CLEAR);
|
auto shader = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_CAMERA_CLEAR);
|
||||||
auto programState = GLProgramState::create(shader);
|
auto programState = GLProgramState::getOrCreateWithGLProgram(shader);
|
||||||
programState->setUniformFloat("depth", 1.0);
|
programState->setUniformFloat("depth", 1.0);
|
||||||
programState->apply(Mat4());
|
programState->apply(Mat4());
|
||||||
GLshort indices[6] = {0, 1, 2, 3, 2, 1};
|
GLshort indices[6] = {0, 1, 2, 3, 2, 1};
|
||||||
|
|
Loading…
Reference in New Issue