Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of undeclared identifier 'GL_BGRA_EXT' error in iOS 8(Xcode 6)?

I am using Unity 4.3.4f1. and untill right now when i was making Builds for iOS they were working fine. I just upgraded my Xcode from v5.1 to v6. now the same code is giving me error like the following

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

can somebody please help me? thanks

like image 297
Dev_Dash Avatar asked Oct 28 '14 05:10

Dev_Dash


1 Answers

You should try replacing gl.h with glext.h in include statements of the file which 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 replacing:-

#include "CMVideoSampling.h"
#include "CVTextureCache.h"
#include "GLESHelper.h"
#include <OpenGLES/ES2/glext.h>//replace glext.h here
#include <AVFoundation/AVFoundation.h>
like image 119
Pawan Joshi Avatar answered Nov 01 '22 02:11

Pawan Joshi