Does Libgdx have an implementation of display lists? - java

I'm stuck developing on an old computer with OpenGL 1.1 only. As such i'm grateful I can use ImmediateMode10 etc, but I don't see a way for me to create display lists in Libgdx. I've searched for glGenList but I don't see it anywhere in the code. Am I missing something simple?

LibGDX uses the OpenGL "ES" subset that was developed for mobile devices. It maps that to standard OpenGL on the desktop, but in general complete OpenGL isn't available through libGDX. Display lists are one of the things that were removed from OpenGL to create OpenGL ES 1.0.
If you are only interested in the OpenGL Java bindings on the desktop, and want more complete OpenGL support, the LWJGL library supports display lists.

Related

How to use Opengl/DirectX in Java

My questions are:
How to use Opengl or DirectX in Java.
Does DirectX have any major advantages over Opengl when using it in Java?
Is there a way to do so without using an API?
Should I use a API such as:
JOGL
LWJGL
Would Java FX be useful for making 3D things?
Also, I am using Windows.
Is there a different way to draw 3D objects??
How to use Opengl or DirectX in Java.
There are a number of OpenGL bindings available for Java. Java does not seem to support DirectX by itself, and neither do there seem to be libraries available that provide bindings.
Does DirectX have any major advantages over Opengl when using it in Java?
I'd say DirectX is at a disadvantage compared to OpenGL due to its lack of support on Linux or OSX. If you want to write cross-platform games using Java, I'd recommend taking a look at OpenGL.
Is there a way to do so without using an API?
I assume you mean a library here. Java offers an API for drawing: Java2D. This might be a nice starting point if you want to write games and are starting out with computer graphics in general. Java does not provide bindings for either OpenGL or DirectX as part of the standard library.
Should I use a API such as: JOGL LWJGL
I have VERY good experiences with LWJGL. I can therefore recommend using their bindings if you want to try using OpenGL.
Would Java FX be useful for making 3D things?
JavaFX is still somewhat buggy as far as my experience goes (came across several bugs when trying it). I don't know how well it works for doing 3D graphics.
JOGL is a Java binding for the OpenGL and OpenGL ES API. I have used JOGL since 2006 and I'm very happy with it, it's very easy to install as you can see here. It works both in desktop and embedded environments, it supports Android too, it is used by almost all major middle and high level APIs including JogAmp's Ardor3D Continuation, JMonkeyEngine, Java3D, Xith3D, LibGDX, ... GLG2D allows to benefit OpenGL when coding in plain Java2D without having to know OpenGL.
I agree with Bartvbl about JavaFX 3D API which is noticeably poorer than the APIs I quoted above.
JOGL is the only unified Java binding for the OpenGL and OpenGL ES API. It is suitable both for games and for other applications (CAD, ...) as it supports several displays, several screens, several monitors. You can use it with JInput if you want to support joysticks.

GLM Library in OpenGL ES

I haven't programmed in Java for 3 years and because of that I'm kinda clumsy with it.
The problem is that i have to develop a Android App with OpenGL ES. Now I'm wondering how I should do my 3D maths. In my C++ games i always used glm (glm.g-truc.net) but this is a C library.
I've seen some posts about this topic which said, that glm is also very good to use in OpenGL ES. But here's the point. I may sound nooby, but i have no clue how to use glm in my OpenGL ES application that's implemented with JAVA. Do I have to use JNI to be able to use that library?

Which OpenGL implementation is best for Java

Im about to start a small project using OpenGL and Java. Looking through this website and google it seems to be unclear what implenetation of OpenGL is best to be used within Java.
I've obtained this list from: Open GL
The JOGL Java/OpenGL bindings
Java 3D (SUN's retained mode library layered on OpenGL)
OpenGL for Java (GL4Java)
YAJOGLB (Yet Another Java OpenGL Binding)
jGL: a 3D graphics library for the Java
What would use recommend in terms of the amount of resources aviabale to learn it and simpleness of implementing a simple either car,helicopter or flight simulator in?
I'm just a beginner with OpenGL but I've been using LWJGL (http://www.lwjgl.org/), which Minecraft uses.
If you want something more high level, try an engine like jMonkeyEngine (http://jmonkeyengine.com/).
I would advise to look into LibGDX if I were you. LWJGL and JOGL are targeted towards PC games. LibGDX on the other hand targets computers with the help of LWJGL, but also Android and iOS; to top it off it supports "HTML 5" with the help of Google Web Toolkit (GWT) - all through a generic API.

3D animation with OpenGl

I have these two images
this
and this
With OpenGl I want to be a result as following
How can I do that with Blackberry or Android
Thanks a lot
If you like there is a library that might help you, its called min3d
http://code.google.com/p/min3d/
its very handy, has a lot of examples, and saves a lot of work
Reflections are typically done using a stencil buffer. Here is a tutorial on how the technique works. You won't be able to use the code though, as it is written for a deprecated version of OpenGL which doesn't match OpenGLES, so you'll need to write your own rendering code. Google provides a basic tutorial on how to use OpenGL ES, here.
If you are actually looking for a 3D engine, jMonkeyEngine is a scene graph based OpenGL engine with powerful features and good community support. It is platform independent and also supports Android >=2.2

LWJGL port to android

Is there a LWJGL port for Android available? (does not matter if the phone needs to rooted)
Things have happened since this question was answered in 2011.
It is new that LWJGL has support for Android.
The linked repo has the setup instructions and the demo, the actual code is in the LWJGL3 repo under the Android branch.
I've been using it for a while now, and this library has a bunch of useful features that aren't just connected to OpenGLES, OpenAL, OpenVR and Vulkan, but it also has a lot of utilities for things like 3D model loading, layouts, dialogs, fonts and a lot more. Meaning the Android port of LWJGL is a considerable add-on to the current OpenGL ES support.
As for other libraries though, you can use no libraries because of the native support. Alternatively, you can use LibGDX or jMonkeyEngine, those are the only two others I know of and have used. Note that these are frameworks and not libraries like LWJGL, meaning they set up a given system you have to follow (one of the reasons I dislike them). It's harder implementing custom features without having to bring out a lot of other parts of the framework that aren't that well documented.
One of LWJGL's main features is its OpenGL support. Android natively supports OpenGL ES so there's basically no need for LWJGL. As for the rest of LWJGL, it doesn't apply on the Android platform anyway - for example there is obviously no mouse to an Android device - so I don't see a direct LWJGL port ever being developed.
Check out the Android reference, especially the android.opengl package, for a good starting point.
A good 3D and 2D engine that uses LWJGL and works well for Android development (and also Desktop and Web Apps) is libGDX.
I can't say for sure, but during last autumn I was searching for quite a long time for that and couldn't find anything. So I would say no, but don't bank on that.

Categories