RFC: GLX_XX_fbconfig_context_version

Given that I just did this in about an hour, the ARB has no excuse not to have one of there own by now. It needs some editing and clean up, but I think it’s technically sound. Comments would be good. A rebuttal from the ARB on why they don’t have a GLX extension yet would be better.

This is more readable from here (google sites)

Name

    XXX_fbconfig_context_version

Name Strings

    GLX_XXX_fbconfig_context_version

Contact

    Branan Riley (branan 'at' comcast.net)

Status

    XXX - Not complete yet!

Version

    Last Modified Date: August 15, 2008
    Author Revision: 0.5
    $Date$ $Revision$

Number

    This extension has not yet been assigned a number

Dependencies

    Opengl 3.0 is required.
    GLX 1.3 is required.
    The extension is written against the GLX 1.4 specification.

Overview

    Since new versions of OpenGL may deprecate features and/or break
    compatibility with older versions, it is necessary to indicate at
    context creation time which interface will be used. This extension
    adds several new atributes to the GLX context creation routines, in
    order to specify the GL version and other context properties.

New Procedures and Functions

    None

New Tokens

    Accepted as an attribute name in <*attrib_list>:
    
        GLX_CONTEXT_MAJOR_VERSION_XXX           0x6000
        GLX_CONTEXT_MINOR_VERSION_XXX           0x6001
        GLX_CONTEX_FLAGS_XXX                    0x6002

    Accepted as bits in the attribute value for GLX_CONTEXT_FLAGS in
    <*attrib_list>:
    
        GLX_CONTEXT_DEBUG_BIT_XXX               0x0001
        GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_XXX  0x0002

Additions to the OpenGL / WGL Specifications

    None. This specification is written for GLX

Additions to the GLX Protocol Specification

    None. This specifcation adds no new entry points

Additions to the GLX specification

    Add to table 3.1: GLXFBConfig attributes:
        Attribute                             Type      Notes
        _________                             ____      _____
        GLX_FBCONFIG_MAJOR_VERSION_XXX        integer   Major version of required OpenGL version
        GLX_FBCONFIG_MINOR_VERSION_XXX        integer   Minor Version of required OpenGL version
        GLX_FBCONFIG_DEBUG_XXX                boolean   Requests a configuration supporting debugging
        GLX_FBCONFIG_FORWARD_COMPATIBLE_XXX   boolean   Requests a configuration which removes deprecated functionality


    Add to section 3.3.3  Configuration Management
        GLX_FBCONFIG_MAJOR_VERSION_XXX and
        GLX_FBCONFIG_MINOR_VERSION_XXX together request a framebuffer
        configuration support the specified version of the OpenGL API.
        If a version less than or equal to 2.1 is requested, the
        framebuffer configuration returned may implement any version no
        less than that requested and no greater than 2.1. If version 3.0
        is requested, the context returned must implementexactly version
        3.0.
        
            (Versioning behavior once GL versions beyond 3.0 are defined
             will be defined by amending this specification to define
             dependencies on such GL versions. It's possible that if
             version 3.N is requested and version 3.(N+1) is truly
             backwards-compatible, a 3.(N+1) context could be returned.
             But we need to specify exactly what "backwards-compatible"
             means given the combination of deprecated features and
             forward-compatible contexts.)
        
        Querying the GL_VERSION string tigh glGetString (or the
        GL_MAJOR_VERSION and GL_MINOR_VERSION values with glGetIntegerv,
        in a 3.0 or later context) will return the actual version
        supported by a context.
        
        The default values for GLX_FBCONFIG_MAJOR_VERSION_XXX and
        GLX_FBCONFIG_MINOR_VERSION_XXX are 1 and 0 respectively. This
        will typically return an OpenGL 2.1 context, if one is
        available.
        
        The attribute name GLX_FBCONFIG_DEBUG_XXX specifies that a
        framebuffer configuration support debugging.  Debug contexts
        provide additional validation, runtime checking, and logging
        while possibly causing performance degradation. The exact
        functionality is implementation dependant. A debug context may
        be identical to a non-debug context.
        
        The attribute name GLX_FBCONFIG_FORWARD_COMPATIBLE_XXX indicates
        that a framebuffer configuration is forward-compatible. Forward-
        compatible contexts are defined in OpenGL versions 3.0 or later.
        A forward-compatible configuration must not support any
        deprecated functionality in the requested API version. A non-
        forward-compatible configuration must support all functionality
        in th specified version, deprecated or not.

     Add to section 3.3.3, pg 17, the second paragraph of the definition
     of glXChooseFBConfig:
         If <attrib_list> contains GLX_FBCONFIG_MAJOR_VERSION_XXX,
         GLX_FBCONFIG_MINOR_VERSION_XXX, and/or
         GLX_FBCONFIG_FORWARD_COMPATIBLE_XXX, and the combination of
         those three attributes is not supported by the specified
         display, then NULL is returned.

Some notes:

  • I may have “context” in a few places it should say “framebuffer configuration”. I was looking at the WGL extension when I wrote this.
  • The specification chunk needs cleanup. I kind of threw it together, but I wanted comments on the general idea before I spent a lot of time on it.
  • Anyone who helps fix my bad spec-writing gets credited. yay.

Is there a reason why should not the GLX specification itself be updated to support OpenGL 3.0 context creation? Why GLX extension in the first place? In WGL the matter is different since Microsoft is controlling it.

No technical reason. A new version of GLX would have a longer verification period than a new extension… Which come to think of it, could explain the delay in getting out info on GL3 with GLX.