Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by FlashX · Sep 24, 2014 at 11:53 PM · errorxcode

Semantic Issue Use of undeclared identifier 'GL_BGRA_EXT'

Help!!

im such a newbie to getting Unity to talk with Xcode. Ive signed up for a developers program and done all the necessary steps (i think) in this tutorial http://docs.unity3d.com/Manual/iphone-accountsetup.html however unity doesn't seem to pass on the build to xcode properly, i always have to reopen the project manually in xcode and secondly im getting the following error in xcode:

Semantic Issue Use of undeclared identifier 'GL_BGRA_EXT'

 #include "CMVideoSampling.h"
  
  
  
 #include "CVTextureCache.h"
  
 #include "GLESHelper.h"
  
  
  
 #include <OpenGLES/ES2/gl.h>
  
 #include <AVFoundation/AVFoundation.h>
  
  
  
 void CMVideoSampling_Initialize(CMVideoSampling* sampling)
  
 {
  
     ::memset(sampling, 0x00, sizeof(CMVideoSampling));
  
     if(CanUseCVTextureCache())
  
         sampling->cvTextureCache = CreateCVTextureCache();
  
     else
  
         GLES_CHK(glGenTextures(2, (GLuint*)sampling->glTex));
  
 }
  
  
  
 void CMVideoSampling_Uninitialize(CMVideoSampling* sampling)
  
 {
  
     if(sampling->cvTextureCacheTexture)
  
     {
  
         CFRelease(sampling->cvTextureCacheTexture);
  
         sampling->cvTextureCacheTexture = 0;
  
     }
  
     if(sampling->cvTextureCache)
  
     {
  
         CFRelease(sampling->cvTextureCache);
  
         sampling->cvTextureCache = 0;
  
     }
  
     if(sampling->glTex[0])
  
     {
  
         GLES_CHK(glDeleteTextures(2, (GLuint*)sampling->glTex));
  
         sampling->glTex[0] = sampling->glTex[1] = 0;
  
     }
  
 }
  
  
  
 int CMVideoSampling_SampleBuffer(CMVideoSampling* sampling, void* buffer, int w, int h)
  
 {
  
     int retTex = 0;
  
  
  
     CVImageBufferRef cvImageBuffer = CMSampleBufferGetImageBuffer((CMSampleBufferRef)buffer);
  
     if(CanUseCVTextureCache())
  
     {
  
         if(sampling->cvTextureCacheTexture)
  
         {
  
             CFRelease(sampling->cvTextureCacheTexture);
  
             FlushCVTextureCache(sampling->cvTextureCache);
  
         }
  
         sampling->cvTextureCacheTexture = CreateTextureFromCVTextureCache(sampling->cvTextureCache, cvImageBuffer, w, h, GL_BGRA_EXT, GL_RGBA, GL_UNSIGNED_BYTE);
  
         if(sampling->cvTextureCacheTexture)
  
             retTex = GetGLTextureFromCVTextureCache(sampling->cvTextureCacheTexture);
  
     }
  
     else
  
     {
  
         retTex = sampling->glTex[1];
  
  
  
         CVPixelBufferLockBaseAddress(cvImageBuffer,0);
  
         void* texData = CVPixelBufferGetBaseAddress(cvImageBuffer);
  
  
  
         // TODO: provide unity interface?
  
         GLES_CHK(glBindTexture(GL_TEXTURE_2D, retTex));
  
         GLES_CHK(glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, texData));
  
  
  
         CVPixelBufferUnlockBaseAddress(cvImageBuffer,0);
  
  
  
         // swap read and draw textures
  
         {
  
             int __temp = sampling->glTex[0];
  
             sampling->glTex[0] = sampling->glTex[1];
  
             sampling->glTex[1] = __temp;
  
         }
  
     }
  
  
  
     GLES_CHK(glBindTexture(GL_TEXTURE_2D, retTex));
  
     GLES_CHK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
  
     GLES_CHK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
  
     GLES_CHK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
  
     GLES_CHK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
  
     GLES_CHK(glBindTexture(GL_TEXTURE_2D, 0));
  
  
  
     return retTex;
  
 }
  
  
  
 int  CMVideoSampling_LastSampledTexture(CMVideoSampling* sampling)
  
 {
  
     return sampling->cvTextureCacheTexture ? GetGLTextureFromCVTextureCache(sampling->cvTextureCacheTexture) : sampling->glTex[0];
  
 }
  



Any ideas? ive started from scratch with a basic scene with just a cube in it to eliminate any other issues. please help

cheers

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Guillaume Swing · Sep 25, 2014 at 06:09 PM 0
Share

Hi!

We've got the exact same error. For our case, I guess that's because we are still using an old version of Unity (4.2) and we are building with a Xcode 6 / iOS 8 SD$$anonymous$$.

Those lines seem to be video related... since we don't have any video in our game, I took the freedom to edit the lines where the errors occurs. I simply replaced the GLBGRAEXT with GL_RGBA (there's only 2 occurrences). Just to pass the compilation :)

Then, to avoid to change those lines each time we build, I simply choose "Append" when the Unity Build process is asking what to do.

I'm searching for a proper fix to this. But for now it looks like we have a workaround.

What version of Unity and Xcode / iOS SD$$anonymous$$ are you using?

avatar image Firebeast · Sep 26, 2014 at 03:33 AM 0
Share

Hey I got the same error after updating to Xcode6. I am also using Unity for my project and everything is alright when I use the old Xcode.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by unimechanic · Sep 29, 2014 at 07:53 PM

Your question has been answered here:

http://forum.unity3d.com/threads/newbie-help-errors-with-basic-ios-export.270347/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Xcode error dyld: symbol not found: _glbeginquery 0 Answers

Converting project from Unity 3.3 to 3.4 ERRORS 0 Answers

Problems when building using Xcode 0 Answers

A node in a childnode? 1 Answer

Unity to Xcode Problem 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges