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.
Related
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.
Is there some super-easy basic hello world cube project (with setup tutorial) for SDL2 that builds and runs easily across (Windows, Linux eg Ubuntu, Mac OS X, Android, iOS), using modern OpenGL as in OpenGL 3.x or 4.x and OpenGLES 2.0 or 3.0?
I downloaded SDL2 and it was pretty easy to get their example testgles.cpp and testgl.cpp to build...
However, the testgl.cpp one is horribly old (gl2 style), so I tried the testgles.cpp. Unfortunately, even this is full of old style fixed function calls like glMatrixMode(GL_MODELVIEW). And it's annoyingly over-integrated with SDLTest_Common code.
Is there a better simple clean hello world project (eg colored cube, textured cube) that I can start from?
Or is there some reason why they don't include such an example starting project or tutorial?
Or should I be using a different library instead of SDL2 that is simpler & cleaner to setup? Basically I want to write OpenGL / OpenGLES (and maybe DirectX) cross-platform C++ code. But setting up SDL2 has been a lot messier and more painful than I expected.
So far I just made an svn repository with SDL2 code and got testgl.cpp and testgles.cpp to build on those five platforms. But that used a lot of old style OpenGL/OpenGLES code, so now I am slowly hacking it to use newer stuff... It's been quite a pain. I don't get why SDL2 doesn't just include a basic hello world cross-platform starting project (eg textured cube) using modern OpenGL/OpenGLES (and DirectX).
SDL2 is a good way to start. I could even say, that SDL is the most popular and yet multiplatform lib for that, especially is you think about using joystics or going steam later on. There is no need to look for any other lib. But please remember, that it's just low level layer for providing media access. It's not their job to provide high quality Opengl 3.0 projects to users. What you need is to learn some modern OGL basics - and you have to do it somewhere else. As simple as that.
A good place to start is http://www.open.gl. There is a couple of very straightforward and simple tutorials written in C++ with some SDL and SFML approach.
Lazy Foo also cover some of the topic http://lazyfoo.net/tutorials/SDL/
http://openme.gl/ is also nice, maybe http://openme.gl/opengl-4-x-example-using-sdl2-and-glm/ is something for you. It seems to be a quite good quality code.
http://www.opengl-tutorial.org/ is also a great place to learn OpenGL 3.3+. It's recomended in many places.
You can always come with some kind of project like this and link to official SDL wiki. ;) SDL community will be greatfull for that.
And by the way. DirectX is "Microsoft's non-opensource SDL" - and it's very non-crossplatform.
If you want to write cross platform OpenGL, you might take a look at GLFW for setting up your OpenGL context. It handles simple window and context creation as well as user input.
I have a method to render a colored cube in some of my example code here. It's pretty enmeshed in my library though as it makes lots of calls out to my wrapper classes. They're also available in the same library, or you can take a look at the latest version of them here.
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
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.
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