maplemuman
maplemuman

Reputation: 427

How to get EGLNativeWindowType in iOS platform?

How can I obtain a EGLNativeWindowType object in the iOS platform? or achieve the equivalent of the following android code?

To provide a bit more insight, I am currently porting a native android app to iOS which shares a single core C library, while the iOS project itself is written in Objective-C. The project is also using EGL and not EAGL.

The existing source code is standard C but uses Android's NDK; a EGLSurface object is defined with EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)

EGLNativeWindowType win = AndroidMainGetAndroidActivity()->app->window;
EGLSurface eglSurface = eglCreateWindowSurface(e_eglDisplay, config, win, NULL);

I haven't found any documentation relating to EGLNativeWindowType and iOS.

Upvotes: 1

Views: 985

Answers (1)

Sergei Vasilenko
Sergei Vasilenko

Reputation: 2343

iOS uses EAGL as an interface between OpenGL ES and the underlying windowing system. EAGL need for iOS as EGL needs for Android to draw via OpenGL ES. So you can not use EGL API on iOS.

Differences between them and how them works very good described in an article.

Upvotes: 0

Related Questions