From d38901c10077844982472fe3850247affd03fc27 Mon Sep 17 00:00:00 2001 From: bmanGH Date: Sun, 13 Oct 2013 14:05:51 +0800 Subject: [PATCH] fix GL_EXT_discard_framebuffer always disable in EAGLView.mm (fix compile fail on early iOS SDK 4.0); --- cocos2dx/platform/ios/EAGLView.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos2dx/platform/ios/EAGLView.mm b/cocos2dx/platform/ios/EAGLView.mm index 9f8f4c8331..64ea03991e 100644 --- a/cocos2dx/platform/ios/EAGLView.mm +++ b/cocos2dx/platform/ios/EAGLView.mm @@ -237,7 +237,11 @@ static CCEAGLView *view = 0; context_ = [renderer_ context]; - discardFramebufferSupported_ = (BOOL)GL_EXT_discard_framebuffer; +#if GL_EXT_discard_framebuffer == 1 + discardFramebufferSupported_ = YES; +#else + discardFramebufferSupported_ = NO; +#endif CHECK_GL_ERROR();