Using the undeclared GL_BGRA_EXT identification error in iOS 8 (Xcode 6)?

I am using Unity 4.3.4f1. and so far, when I did Builds for iOS, they worked fine. I just upgraded my Xcode from v5.1 to v6. now the same code gives me an error as shown below.

/.Project DIR/Classes/Unity/CMVideoSampling.mm:51:122: Use of undeclared identifier 'GL_BGRA_EXT' 

Can someone please help me? thanks

+7
objective-c ios8 xcode6 unity3d
source share
1 answer

You should try replacing gl.h glext.h in the include statements of the file that contains this error.

Replace the following: -

 #include <OpenGLES/ES2/gl.h> 

with this: -

  #include <OpenGLES/ES2/glext.h> 

your include statements should look like this: -

Previously: -

 #include "CMVideoSampling.h" #include "CVTextureCache.h" #include "GLESHelper.h" #include <OpenGLES/ES2/gl.h> #include <AVFoundation/AVFoundation.h> 

After replacement: -

 #include "CMVideoSampling.h" #include "CVTextureCache.h" #include "GLESHelper.h" #include <OpenGLES/ES2/glext.h>//replace glext.h here #include <AVFoundation/AVFoundation.h> 
+21
source share

All Articles