Always clear since vbo is first created

This commit is contained in:
raven02 2013-03-09 21:56:32 +08:00
parent dca1d4fb1d
commit b18ee61676

View File

@ -367,15 +367,10 @@ void FramebufferManager::SetRenderFrameBuffer() {
vfb->last_frame_used = gpuStats.numFrames;
vfbs_.push_back(vfb);
#ifdef USING_GLES2
if (vfb->last_frame_used != gpuStats.numFrames) {
glstate.depthWrite.set(GL_TRUE);
glstate.colorMask.set(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
#endif
glstate.depthWrite.set(GL_TRUE);
glstate.colorMask.set(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
glEnable(GL_DITHER);
glstate.viewport.set(0, 0, vfb->renderWidth, vfb->renderHeight);
currentRenderVfb_ = vfb;