OpenGL ES -> _OES suffix
I'm interested in learning OpenGL, so I started reading the book 3D programming for iPhone by O'Reilly. And guess what, I got stuck at the first exercise.
Even though I followed the guidelines, my Xcode application won't allow me to use the _OES suffix in the functions glGenFramebuffers and glGenRenderbuffers. I did some research, and it appears that this is related to the 2.0 version. However, I did in fact add both:
#import <OpenGLES/Es1/gl.h>
#import <OpenGLES/ES2/glext.h>
and the added OpenGL framework also includes the header files for both ES 1 and 2.
So I did some more research, and downloaded the project that I found in this thread: Example from Chapter 1 of iphone 3D programming book not drawing to screen.
When I run it in my Xcode, it works. I don't see any difference between our projects, so why does the _OES suffix in fact work for him and not for me while using the same version of Xcode? I even copy - pasted his code into my own project, but my Xcode project won't all开发者_C百科ow it. Well, I don't get bugs either by just leaving out the _OES suffix, but I only get a black screen when running the app so it must mean something is wrong.
As a second problem is also that I get a lot of linker errors when I try to run the app on the iPhone simulator; I don't get these errors when I try it on my iPad. And I don't get these linker errors on my simulator when I use the downloaded project; it works for both the simulator and my iPad.
I'm terribly confused, has someone an idea what could be the cause of all this? I'd like to continue, but I'm stuck :-) Thank you very much for your attention and help!
精彩评论