Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL ES 2.0 possible without NDK?

I am learning Android development, specifically to eventually do OpengL 2.0 ES on it.

So far I have read that the NDK supports Opengl 2.0 ES.

However, is there also a Java API for it?

If there is a Java API for it, which one is recommended? I know both C++ and Java, so it is not a big deal if I have to use the NDK, but I would prefer to work only in Java if possible and without a big performance hit.

like image 537
user430277 Avatar asked Nov 15 '22 08:11

user430277


1 Answers

Yes, you can use OpenGL ES 2.0 from Java without touching NDK at all. Here is official documentation about starting OpenGL ES 2.0 in Android: http://developer.android.com/resources/tutorials/opengl/opengl-es20.html

Also take a look at official samples that comes together with SDK. Here are relevant the files under samples directory:

* ApiDemos\src\com\example\android\apis\graphics\GLES20Activity.java
* ApiDemos\src\com\example\android\apis\graphics\GLES20TriangleRenderer.java
* BasicGLSurfaceView\src\com\example\android\basicglsurfaceview\*.java
like image 139
Mārtiņš Možeiko Avatar answered Jan 12 '23 19:01

Mārtiņš Možeiko