Initialising the OpenGL ES Context via C++

1,062 views
Skip to first unread message

Aya

unread,
Jan 25, 2011, 6:15:55 AM1/25/11
to android-ndk
Hi,

in every example about the NDK and OpenGL ES I found, the OpenGL stuff
is initialised in the java-code.

I was wondering.. is there any way to setup the context in the Native C
++ Code? (Stuff like eglCreateContext etc)

Thanks,
Aya

dima

unread,
Jan 25, 2011, 2:52:51 PM1/25/11
to android-ndk
yeah i did it. it's pretty straight forward egl setup. but it need
android 2.3 for the egl libs and headers.

Aya Koshigaya

unread,
Jan 25, 2011, 5:00:05 PM1/25/11
to andro...@googlegroups.com
Hi,

could you give me an example how to do this?

Thanks a lot!
Aya


On 25.01.2011, at 20:52, dima wrote:

> yeah i did it. it's pretty straight forward egl setup. but it need
> android 2.3 for the egl libs and headers.
>

> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
>

Wex

unread,
Jan 25, 2011, 9:45:38 PM1/25/11
to android-ndk
See the native-activity sample in the NDK (under samples) for a
working example of EGL initialization code.

Bill Hsu

unread,
Jan 25, 2011, 9:46:20 PM1/25/11
to andro...@googlegroups.com
 android 2.1 didn't support such egl libs and headers?
i'm wondering can we make it on android 2.1

On Wed, Jan 26, 2011 at 3:52 AM, dima <dimato...@googlemail.com> wrote:
yeah i did it. it's pretty straight forward egl setup. but it need
android 2.3 for the egl libs and headers.

Dianne Hackborn

unread,
Jan 25, 2011, 9:51:28 PM1/25/11
to andro...@googlegroups.com
No you can't on 2.1.  These native APIs are first introduced in 2.3.
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Aya

unread,
Jan 26, 2011, 4:20:29 AM1/26/11
to android-ndk
> See the native-activity sample in the NDK (under samples) for a
> working example of EGL initialization code.

Ah, thanks a lot! That's exactly what I was searching for :)
Reply all
Reply to author
Forward
0 new messages