fixed issue with crashes on devices that only support openGL 1.1

This commit is contained in:
techdragon.nguyen@gmail.com
2011-12-13 22:28:16 +00:00
parent 8b7ae968a5
commit 8550b70e2e
5 changed files with 697 additions and 23 deletions
+3 -1
View File
@@ -31,7 +31,9 @@ bool checkFramebufferStatus();
backingHeight = -1;
context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
if ( context == nil)
context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES1];
if (!context || ![EAGLContext setCurrentContext:context])
{
[self release];