Libgdx - Support for OpenGL 4+ - opengl

Is it possible to use Libgdx for a desktop development only and access newer versions of Opengl from Libgdx abstraction? I mean, if you want to develop mobile apps you will have to use a some verison of Opengl ES, which does not support lot of things like classic Opengl does (e.g. drawing wireframes, etc.).
Lets say I don't want to use Opengl ES but normal Opengl, version 4+ in these days, and fully use its features for oa desktop development. Does Libgdx have support for this?

On the desktop, libGDX is built on top of LWJGL, which at of the time of this answer supports up to OpenGL version 4.5.
So if you're using libGDX on the desktop, then you can simply access the LWJGL calls directly. This will break your build for mobile or web deployment though.

Related

libGDX's plan for OpenGL deprecation

libGDX is based on OpenGL (ES), but iOS 12 has officially deprecated OpenGL. There will be tons of job to do if libGDX wants to evolve. For commercial engines, they have started long to adapt to the OpenGL deprecation. Any plan from libGDX team? Or have they already started the works?
Initially they were reluctant to support Vulkan. Recently they are looking into both of Metal and Vulkan support by using ANGLE as backend.
Metal/Vulkan Support [Planned]
We are well aware that Apple has deprecated OpenGL (ES) on iOS and macOS. Thus, we are looking into Metal/Vulkan support in the near future. Projects like ANGLE look very promising for this.
See their roadmap.
Currently, ANGLE's Metal support is still in progress. Once it has done, the libGDX developer team will work on. I hope so.
Already an issue for the same on LibGDX issue tracker.
Discussed possibilities :
Replace OPENGL/Adding support of metal
All rendering code in libGDX is based on the GLES API. Adding Metal would
require a complete rewrite of all rendering code, which would essentially
mean an almost rewrite of libGDX.
Software implementation of OpenGL on top of Metal (writing a wrapper)
MoltenGL is an implementation of the OpenGL ES 2.0 API that runs on Apple's Metal graphics framework.
Angle, Vulkan is in progress(may be in future it support metal.)

Is Cocos2d-x always uses OpenGL?

Can I relay on my Cocos2d-x based application game to always use OpenGL (and OpenGL ES in mobile platforms)? Since this library allows inline OpenGL calls within it's code I want to know if I can use them without worrying about portability. Is there anything else Cocos2d-x uses for rendering? Like DirectX in Windows Desktop / Phone and maybe a software renderer on devices without graphic cards?
Cocos2d-x uses OpenGL on all platforms.
Keep in mind that on Desktop OSs depending on OS, GPU and drivers the OpenGL renderer may fall back to software rendering for certain features, or not support them at all (drawing glitches or errors).
Moreover OpenGL for desktop computers and OpenGL ES for mobile devices are not fully compatible both in API and supported features.

What is the closest complete native library to three.js?

I am looking for the best native library that is similar to three.js in its structure and simplicity but is also extensible enough to support glsl shaders.
Requirements:
Open Source or very well documented for possible extension/enhancement
Allows commercial derivatives/use
Can either be wrapped in a physics library or easily paired with one.
Fast enough to support modern game graphics.
OpenGL or Mantle based. (I don't want to be stuck with windows.)
Windows support
Supports a system similar to three.js local/world coordinate system.
Raycasting support for doing collision detection.
Huge Bonus:
Supports Linux and OSX as well as windows.
I am looking for the closest match to Three.js as possible that is written in C++ similar to three.cpp but has completed functionality and is less beta/alpha status.
Have you tried Magnum ?
http://mosra.cz/blog/download-magnum.php
Supported platforms
Graphics APIs:
OpenGL 2.1 through 4.4, core profile functionality and modern extensions
OpenGL ES 2.0, 3.0 and extensions to match desktop OpenGL functionality
WebGL 1.0 and extensions to match desktop OpenGL functionality
Platforms:
Linux and embedded Linux (natively using GLX/EGL and Xlib or through GLUT or SDL2 toolkit)
Windows (through GLUT or SDL2 toolkit)
OS X (through SDL2 toolkit, thanks to Miguel Martin)
Google Chrome (through Native Client, both newlib and glibc toolchains are supported)
HTML5/JavaScript (through Emscripten)
Threejs actually does support glsl shaders. You can use THREE.ShaderMaterial class to create your own shader then pass your vertexShader and fragmentShader to it.
Another option is to program directly in WebGL. ThreeJS is built on top of WebGL. The only reason why I decided to use ThreeJS was to avoid writing glsl shaders since WebGL doesn't have materials and forces you to write your own glsl shaders, so if that's what you want you could go directly to WebGL. WebGL is more low level than Threejs.
If you don't like javascript, then you could use JogAmp's Ardor3D which is in Java. It's a 3D scenegraph renderer just like Threejs but in Java.
All of the above options have super fast game quality rendering performance.

browser engine with OpenGL backend

Is there a browser engine that may use OpenGL as backend or adpater library to provide such? So that a web page can be rendered using a usual programmable pipeline of OpenGL.
I thought most browsers would use well known 2D frameworks that maybe would be provided with adapters by 3rd party, but just cant figure out if for example Webkit could work from a single mainstream 2D library.
Recent versions of WebKit will use the GPU accelerated graphics APIs provided by the OS if available. Direct2D on Windows and OpenVG on other systems if available. That being said it would be perfectly possible to implement a OpenGL backend to WebKit.
I suggest you look at current developments regarding Wayland on Linux, which will require some major changes in the way applications to their graphics business. There should be already substancial work on the WebKit-GTK+ bindings to make it use EGL created graphics surfaces. It is trivial to bind such EGL surfaces as OpenGL texture.
OpenGLES is not a 2D library, but I presume you meant frameworks that use OpenGLES for primarily 2D texturing. Chromium is one of the good examples of how OpenGL ES2 can be used for this, it accelerates canvas, CSS, and composition among other things using OpenGLES2.
http://www.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome
Until recently, the cairo-directfb backend for Webkit used to be quite popular, but now with every SOC having GLES2 support, things have changed. See for example below:
http://luorhino2006.wordpress.com/2010/04/02/build-webkit-over-pango-cairo-and-directfb-from-scratch/

iPhone OpenGL ES

Since I'm not familiar with iPhone development I'd like to know whether it is possible to use OpenGL ES1.0 on the iPhone 3gs rather than 2.0.
I'd like to share a code base across different mobile platforms and not having to deal with the programmable pipeline from OGLES 2.0 could speed up an initial build.
Update -- I'm not used to working with OpenGL Es, but is there a always complete backward compatibility or do phones sometimes only support the latest version, eg 2.0
Thanks
Yes, you can. Simply call the OpenGL ES 1.0 APIs. The hardware is a full 2.0 device, but the software/driver can implement an OpenGL 1.x pipeline for you.