File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -367,9 +367,6 @@ -(void)presentFrame
367
367
GLenum attachments[] = {GL_COLOR_ATTACHMENT0};
368
368
glDiscardFramebufferEXT (GL_READ_FRAMEBUFFER_APPLE, 1 , attachments);
369
369
}
370
-
371
- glBindRenderbuffer (GL_RENDERBUFFER, [_renderer colorRenderBuffer ]);
372
-
373
370
}
374
371
375
372
// not MSAA
@@ -379,13 +376,17 @@ -(void)presentFrame
379
376
}
380
377
}
381
378
382
- if (![_context presentRenderbuffer: GL_RENDERBUFFER])
379
+ glBindRenderbuffer (GL_RENDERBUFFER, [_renderer colorRenderBuffer ]);
380
+
381
+ if (![_context presentRenderbuffer: GL_RENDERBUFFER]){
383
382
CCLOG (@" cocos2d: Failed to swap renderbuffer in %s \n " , __FUNCTION__);
383
+ }
384
384
385
385
// We can safely re-bind the framebuffer here, since this will be the
386
386
// 1st instruction of the new main loop
387
- if ( _multiSampling )
387
+ if ( _multiSampling ){
388
388
glBindFramebuffer (GL_FRAMEBUFFER, [_renderer msaaFrameBuffer ]);
389
+ }
389
390
390
391
// Check the fences for completion.
391
392
for (CCGLViewFence *fence in _fences){
You can’t perform that action at this time.
0 commit comments