OpenGL ES 2.0 possible without NDK? - android

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.

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

As far as i searched this website has some good useful samples related to openGL
http://www.droidnova.com/?s=openGL

Related

Is this possible, GNOME (lib)Clutter with OpenGL ES & Vulkane?

I'm planning to run an app based on (GNOME) libclutter on Android 9 (Pie). I'm quite new to these graphics related stuff, been wondering on these things, so seeking for guidance/direction whatever data that could help me to understand this thing better.
As per the documentation of Android Graphics, Android is using OpenGL ES & Vulkane at low level to render objects. And as per GNOME Clutter documentation, it could be only compiled with mentioned back-end only! (Please check embedded link to for platforms details.)
I don't see OpenGL ES or Vulkane support, So am I missing something on understanding part or it can't be done?!
[Clutter maintainer, here]
Yes, Clutter supports OpenGL ES—it uses Cogl, a library that abstracts GL and GLES concepts.
No, Clutter does not support Vulkan at the moment.
No, Clutter and Cogl do not support Android; there was an experimental port but it has been abandoned in 2012.
Additionally, Clutter is in deep maintenance mode: no new development releases, no new features, and only minimal/security/crasher bug fixes are allowed.
I would not recommend using Clutter in a newly written project.
OKay...after spending few more hours, I was able to figure out an answer! (Yayy..!!!)
As per Clutter Project website: (somehow I had missed this info previously! :p)
Clutter uses OpenGL for rendering (and optionally OpenGL ES for use on mobile and embedded platforms), but wraps an easy to use, efficient, flexible API around GL's complexity.
So, as per my requirement, I should be able to integrate and cross-compile Clutter lib source and compile it.
PS: I will try to integrate & build the libclutter on android 9. Will update this answer latter with additional set of information.
==========================================================================
Update:
As pointed out by #ebassi in another answer, I have dropped the idea of integration and looking forward to directly using Android Graphics stack for the implementation.
Thanks #ebassi...!

How to Load a 3D Object in OpenGL ES 2.0 for Android?

I've been working with OpenGL ES 2.0 for a few weeks now to get the hang of it. I've purchased the OpenGLES 2.0 for Android Quickstart Guide (its awesome), and I've been using the Learn OpenGL ES tutorials.
I'm using Blender to model objects, and I believe there is a c++ parser for it. The problem is I've been using Java and have little experience with c++.
Is there a java equivalent I can use? If not, is there a suitable engine I can use? I've used unity before, but I want to try my hand at something more challenging.
Check out this article I just had published. It lists all of the best game engine options for Android and part 2 focuses on OpenGL ES solutions. Some are tightly integrated with Blender and some are all-Java solutions. There are a lot more options now than just Unity and many are open source.

What does VTK 5.6.1 implement OpenGL Version?

I want to know OpenGL Version that VTK 5.6.1 implement because I want to create android application that use vtk.I will use VTK visualize DICOM image and present them on screen.
I know Android OS implement OpenGL ES but I don't know VTK 5.6.1 OpenGL version.if VTK OpenGL's version is 4.1 that support OpenGL ES,it mean I can use vtk 5.6.1 to create android application,right.
Thanking you for assistance in advance.
This is highly related to your other question about using VTK on Android. As I said in response to that question, VTK does not currently support Android (or other embedded systems). The base OpenGL version used by much of VTK is 1.1, but quite a few of the classes test for various OpenGL extensions and use them optionally. Porting VTK to OpenGL ES (1.x or 2.0) is non-trivial, but some initial work has begun. See this post for a little more background.
I have been doing some work on the iOS and Android platforms, largely concerned with using OpenGL ES 2.0 from C++ on both platforms (NDK on Android). The results were promising, but it will take time to port a significant portion of VTK. OpenGL ES 2.0 and Open GL 2.1 are quite similar in their API, but they are not identical.
I'm not entirely sure what your purpose/context is regarding using VTK on android, but if you are talking about reading in VTK files and rendering the objects on android, I can give you an explanation (and perhaps some code) on how to do that. I'm currently programming an app that takes in a legacy-VTK ASCII file and renders the image using opengl. Like Marcus said, its non-trivial, and a little bit rough, but I used basic indexOf and tokenizer/split methods to search through the vtk file for the vertices, indices, normals, and text. coords and put them into buffers. I see this is an old thread, so I'm not going to explain any further/give out code unless someone wants it.

Can i use VTK+Qt for creating my Android applications?

I'm a newbie at android application development and not good at English.
I want to create medical image processing application on android. I have searched for how to use vtk (it's a cross-platfrom image processing library that I use in java) and found that you can use QT with android. My Question: "Can I use VTK+Qt for creating my Android applications?"; and if so, where do I start?
Thanking you for assistance in advance.
You cannot currently use VTK with Android - there is a significant amount of porting to be done. VTK has a desktop OpenGL 1.x implementation, but no OpenGL ES implementation as would be required for mobile platforms. Some early work is starting in this area, but it does mean even if you get Qt working VTK will not be able to render on this device.
Have you tried VES?
VES is the VTK OpenGL ES Rendering Toolkit. It is a C++ rendering library for mobile devices using OpenGL ES 2.0. VES integrates with the Visualization Toolkit (VTK) to deliver scientific and medical visualization capabilities to mobile application developers.
A first VTK port attempt for Android platforms was done by Ethan Rublee on December 2010. The code is still available on his git repository here: https://github.com/ethanrublee

What is the difference between android.opengl and javax.microedition.khronos.opengles packages?

Just couldn't find anything regarding the purpose of android.opengl classes anywhere on the web: they seem to be copies of javax.microedition.khronos.opengles - just with static vs member methods.
So is there any special meaning in using them instead of J2ME classes: are they supposed to be faster, have additional functionality, simpler to work with?
I think of using them instead of passing that GL reference all the time.
Ok, just in case someone is really interested in the difference between android.opengl and OpenGL ES standard javax.microedition.khronos.opengles packages, the following can be found in Android's classic ApiDemos project: javadoc for com.example.android.apis.graphics.StaticTriangleRenderer class tells that android.opengl package simply provides a bit more functionality then standard khronos package, and, quite handy, it's easier for C developers who can simply write glBindBuffer(...) instead of ((GL20) gl).glBindBuffer(...).
Best bet is that the Android ones are optimized and adapted for Android. It's the same with the SAX parser there is the org.xml.sax package and the android.sax package but I think both versions of the parser are optimized for Android.
Android includes support for high
performance 3D graphics via the OpenGL
API — specifically, the OpenGL ES API.
OpenGL ES is a flavor of the OpenGL
specification intended for embedded
devices. Versions of OpenGL ES are
loosely peered to versions of the
primary OpenGL standard. Android
currently supports OpenGL ES 1.0,
which corresponds to OpenGL 1.3. So,
if the application you have in mind is
possible with OpenGL 1.3 on a desktop
system, it should be possible on
Android.

Categories

Resources