LWJGL
May 22, 2012, 14:55:54 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: OpenGL 4.1 and new extensions  (Read 1885 times)
spasi
Nerdus Imperius
*****
Posts: 643



WWW
« on: July 27, 2010, 08:38:46 »

Support for OpenGL 4.1 and equivalent extensions has been added to LWJGL. Extension list:

ARB_debug_output (callback is supported just like AMD_debug_output, check the org.lwjgl.opengl.ARBDebugOutputCallback class)
ARB_ES_compatibility
ARB_get_program_binary
ARB_robustness
ARB_separate_shader_objects
ARB_shader_precision
ARB_shader_stencil_export
ARB_vertex_attrib_64bit
ARB_viewport_array

From the latest extensions, only ARB_cl_event is missing. I'll add that one when we add support for OpenCL.
Logged

Matthias
Talks Too Much
***
Posts: 178


WWW
« Reply #1 on: July 27, 2010, 08:56:46 »

Great work. You are really fast Smiley
* Matthias waits for next driver update to test some of the new features.
Logged

Matzon
Administrator
Demigod
*****
Posts: 2177



« Reply #2 on: July 27, 2010, 14:01:16 »

Great work. You are really fast Smiley
* Matthias waits for next driver update to test some of the new features.
++
excellent work!

should we add some stuff in util to store and load shaders - or is it simple to use?
same question with the debug stuff?
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
spasi
Nerdus Imperius
*****
Posts: 643



WWW
« Reply #3 on: July 27, 2010, 15:30:44 »

Might be useful, but I think most people will roll their own solutions anyway. We have the shader tests that can be a useful starting place for new LWJGL users. Loading shaders specifically is dead simple with the recent CharSequence support.

The debug callback classes needed to be in org.lwjgl.opengl because they require package private functionality that interacts with native code. They're also simple to use and default implementations are provided (they dump everything to System.err).
Logged

Matzon
Administrator
Demigod
*****
Posts: 2177



« Reply #4 on: July 27, 2010, 15:45:38 »

wrt, sharders - I was thinking of the binary compiled shaders
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
spasi
Nerdus Imperius
*****
Posts: 643



WWW
« Reply #5 on: July 28, 2010, 02:02:03 »

Binary shaders are also very simple to use, but with one catch; the loading of a binary shader program may fail at any time because of a hardware/software change (e.g. new driver version that comes with a better compiler). When that happens the application must fall-back to normal shader program creation, which means we can't have a robust solution in util.
Logged

princec
Nerdus Imperius
*****
Posts: 1782



WWW
« Reply #6 on: July 28, 2010, 04:11:33 »

I confess I can't quite see the utility in binary shaders. A tiny performance gain but increased instability? Not in the modern world, thanks.

Cas Smiley
Logged

spasi
Nerdus Imperius
*****
Posts: 643



WWW
« Reply #7 on: July 28, 2010, 04:53:11 »

Binary shaders are all about start-up speed. It's not only the resources wasted by the driver compiler or the time it takes to compile/link/optimize shader programs (which can be very significant for complex rendering with hundreds of shaders). You also gain performance on the application side, because you don't have to "construct" the shader code again. Modern engines have to combine dozens of little shader scripts, dynamically insert the proper uniforms/flags/directives/etc, there's a lot of pre-processing required. If you can cache all that, the computation and IO gains are important. Besides, you can layer binary shaders on top of all that, I don't think it creates any instability.

Btw, they've even added new API (glReleaseShaderCompiler) that informs the driver to release resources allocated by the shader compiler.
Logged

Bonbon
Newbie
*
Posts: 4



« Reply #8 on: August 25, 2010, 00:33:52 »

How the ARB_ES_compatibility extensions works ?

I'm looking to make a port of LWJL to the Pandora device (ARM Linux with only OpenGL ES on it). I don't think so but that this extension works with the OpenGL ES driver or only with the OpenGL 4.1 driver ?
Logged
spasi
Nerdus Imperius
*****
Posts: 643



WWW
« Reply #9 on: August 25, 2010, 03:38:36 »

ARB_ES2_compatibility is only exposed on desktop OpenGL implementations. Practically, it only helps to have some kind of source-level compatibility between desktop GL and GL-ES (in C code mostly). With a Java binding like LWJGL it's basically useless, you need proper ES2 support. Even if you do all the EGL context management yourself and pass it down to LWJGL with GLContext.useContext, LWJGL still needs to "know" about eglGetProcAddress to do anything useful.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!