OpenGLES特に とEAGLContextを使用する数百行の iOS コードを Mac に移植していますCAEAGLLayer。
これまでのところ、 を に変更しOpenGLES.frameworkてOpenGL.framework追加しました:
#if TARGET_OS_IPHONE
#import <OpenGLES/EAGL.h>
#import <OpenGLES/EAGLDrawable.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#else
#import <OpenGL/OpenGL.h>
#endif
#if TARGET_OS_IPHONE
#define MYOpenGLContext EAGLContext
#define MYOpenGLLayer CAEAGLLayer
#else
#define MYOpenGLContext NSOpenGLContext
#define MYOpenGLLayer CAOpenGLLayer
#endif
次に、 and のすべての出現箇所をそれぞれ and に変更しEAGLContextましCAEAGLLayerた。MYOpenGLContextMYOpenGLLayer
glOrthofやなどglBindFramebufferOESの関数glGenRenderbuffersOESが認識されないため、これでは不十分です。それらを置き換えるには何を使用すればよいですか?