OpenGL ES 2.0 support?

90 views
Skip to first unread message

Bnl

unread,
Apr 17, 2014, 12:04:47 PM4/17/14
to codenameone...@googlegroups.com
Hi!

I am considering using Codename One for a 3D project.
My question is if Codename One supports writing native OpenGL ES? (i.e. access OpenGL ES 2.0 directly)

(It is hard to find an answer to this question. On some forums it seems like it does not, but those treads are a bit old so maybe it has changed in the meantime.)

I have not looked much at Codename One yet, but if OpenGL is not supported, i guess it's possible to access the platform's (iOS, Android, ...) native API, and access OpenGL in that way? (Or maybe even write native C and wrap in it Java using JNI?)

Thanx!


P.S. Bonus Question: Can Codename One also compile to the web (i.e. to JavaScript and WebGL)? (if you avoid crashing into the limitations of javascript, of course, such as no threads, few numeric types, etc). If not, can it compile to applets?

Shai Almog

unread,
Apr 17, 2014, 2:52:34 PM4/17/14
to codenameone...@googlegroups.com, bjark...@gmail.com
Hi,
sorry we don't. We might offer direct OGL access in the future but right now its not a priority and its pretty hard to simulate correctly.

We don't support web compilation at the moment although the limitation for us is threads. We might have a future version that allows that but that would be pretty difficult to accomplish since we rely so heavily on threads.

Bnl

unread,
Apr 17, 2014, 3:08:04 PM4/17/14
to codenameone...@googlegroups.com, bjark...@gmail.com
Ok, thanx for your answer :)

omega...@gmail.com

unread,
Jul 4, 2014, 8:15:55 PM7/4/14
to codenameone...@googlegroups.com, bjark...@gmail.com
If the OpenGL API is not supported, what is your recommendation for developing an app that has 3D graphics?


Shai Almog

unread,
Jul 4, 2014, 11:59:01 PM7/4/14
to codenameone...@googlegroups.com, bjark...@gmail.com, omega...@gmail.com
You can use the native interfaces http://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html
If you have a block of 3D code that is standalone that should work fine. You can also package that in a library and use it or wrap it in a PeerComponent. E.g. the GoogleMaps native implementation is based on OpenGL and we embed it into Codename One application with a few caveats see:
http://www.codenameone.com/3/post/2014/03/mapping-natively.html
http://www.codenameone.com/3/post/2014/05/understanding-peer-native-components-why-codename-one-is-so-portable.html
Reply all
Reply to author
Forward
0 new messages