OpenGL 3.1 support and new extensions

Started by spasi, March 25, 2009, 17:51:53

Previous topic - Next topic

spasi

Hi all,

Support for OpenGL 3.1 has just been added to LWJGL, together with a bunch of new extensions. I haven't been able to find the values for 2 tokens (COPY_READ_BUFFER and COPY_WRITE_BUFFER), but this should be resolved soon.

Features added/promoted to 3.1 core:

- Signed Normalized Textures
- ARB_draw_instanced
- EXT_copy_buffer (the spec for this is currently missing)
- NV_primitive_restart
- ARB_texture_buffer_object
- ARB_texture_rectangle
- ARB_uniform_buffer_object

New extensions supported:

- AMD_performance_monitor
- AMD_texture_texture4
- AMD_vertex_shader_tesselator
- ARB_compatibility
- ARB_uniform_buffer_object
- ATI_meminfo
- EXT_provoking_vertex
- EXT_texture_swizzle
- EXT_vertex_array_bgra
- NV_explicit_multisample
- NV_transform_feedback2

Matzon

Quick! as usual!

However, we should probably think about disabling some things, when you activate the OGL 3.1 path - as per specs:
"Unlike earlier versions of OpenGL, OpenGL 3.1 is not upward compatible with earlier versions. The commands and interfaces identified as deprecated in OpenGL 3.0 (see appendix F) have been removed from OpenGL 3.1 entirely,"

elias

...unless ARB_compatibility is supported

spasi

Disabling deprecated functionality is already supported with the forward compatible mode. I'll try and see what changes we need to handle this elegantly. There's the issue with LineWidth too, which has been un-deprecated. :)

elias4444

Where do you find out what's been deprecated (and un-deprecated) anyway? I'm desperately trying to keep up these days, but am having a hard time finding good information.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

spasi

This version of the OpenGL specification has all deprecated features highlighted. There's also a nice summary in Appendix E.

spasi

OK, I've committed another change. If OpenGL version is 3.1 or higher and ARB_compatibility isn't supported, the forward compatible mode will be forced, which means LWJGL won't try to load deprecated function addresses and a runtime exception will be thrown if they are called. The user still has the option to enable forward compatible mode, even when the driver exposes everything.

I've also added the new context creation stuff in the linux implementation. I didn't implement the actual calls though, I don't really feel comfortable in that code without a compiler. Is it possible for Elias to pick that up? The extension is GLX_ARB_create_context, the new context creation function is glXCreateContextAttribsARB. It requires GLX 1.4, not sure if that's important (I've added it in the version detection code anyway).

spasi


elias

I can probably do the ogl 3 changes for linux, but I'm too busy at the moment. Maybe I'll have the time when ubuntu 9.04 is out, hopefully with ogl 3 nvidia drivers.

- elias

elias

In the meantime, is it possible to add a basic gl3/gl3.1 test to the lwjgl svn for me to work from?

- elias

spasi

Done. Run with VersionTest <majorVersion> <minorVersion>. Also supports 3 more optional arguments, "debug" for enabling debug mode in a 3.x context, "fc" for enabling forward compatibility mode and for setting the layer plane.

e.g. VersionTest 3 1 0 debug fc - will create a 3.1 context at layer 0, with debug and forward compatible mode on.


elias

Linux support for the new context creation method is comitted.

- elias