Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: OpenGL 4.5 support - how much longer to wait?!

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2010
    Location
    Oakville, ON, CA
    Posts
    165

    OpenGL 4.5 support - how much longer to wait?!

    Quote Originally Posted by Yandersen View Post
    Hello!

    The 4.5 version was here for a while, but it seems like nVidia does not hassle to support it in a variety of it's hardware. I have a GeForce GT 520 videocard and OpenGL 4.4 is still a top-version supported with the newest drivers (version 344.75). What bothers me most is that the GL_ARB_clip_control is not supported (the other extensions brought by OpenGL 4.5 are awesome to have as well, but this particular one is mostly critical for me). I know it shouldn't matter for a cross-platform library like OpenGL, but "just in case" I will mention that I sit on WinXP32. So what should I do? Wait some more time (but how long and is there a guarantee?..) or buy a new videocard?
    Quote Originally Posted by Aleksandar
    OpenGL 4.5 is supported in NVIDIA beta drivers for Windows (since you are using XP) ver. 340.65, 340.76 and 340.82.
    GL_ARB_clip_control was supported by 340.65 (I didn't test later ones). If you want to play with beta drivers download and try some of the mentioned above.

    The latest release drivers still support "only" OpenGL 4.4.
    Thank you, Aleksandar. So, there are no release drivers supporting OpenGL 4.5 at all or is it just a WinXP specific problem? Any ideas why is it so and if there is a chance the 4.5 will widespread in near future?
    Is it bad to use beta drivers? I'm sure the majority of the users installs the release versions of drivers - does it mean that writing app that requires features from OGL4.5 is senseless?

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214
    No, it is not a WinXP specific problem. NVIDIA releases beta drivers with the latest OpenGL at the same time a new specification is announced. It is really great for enthusiasts wanting to try new features. But usually it requires some time for thorough testing and implementation polishing, inducing certain latency for the inclusion in the release version of the drivers. For other vendors the time could pass until the support is brought to users.

    It is not bad to use beta drivers. At least on your own computer.
    But don't force others to use them, since they can be unstable or miss some functionality.

    Also, it is not useless to write an application based on new features. If it runs on your computer it is just fine.
    If it runs on other people computers and you can control how they manage drivers, have NV cards, presumably post-Fermi, etc., you should wait at least a year to have a proper functioning. If you write application for wider audience, well ... many years could pass until many of them could try your application.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Dec 2010
    Location
    Oakville, ON, CA
    Posts
    165
    Thank you very much, Aleksandar. It is very sad to hear how long it may take for the 4.5 features to become released to users. I remember the 4.4 version took no more than a few month to replace the 4.3 version. There wasn't much in it comparing to the 4.5 features, though. Will wait then...

  4. #4
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214
    OpenGL has probably become a mature API and new additions are not as important as they were in previous revisions.

    May I ask why you are so excited with ARB_clip_control? This extension could slightly improve precision, but I can still live quite good without it.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Dec 2010
    Location
    Oakville, ON, CA
    Posts
    165
    Quote Originally Posted by Aleksandar View Post
    May I ask why you are so excited with ARB_clip_control? This extension could slightly improve precision, but I can still live quite good without it.
    I see this extension as part of the solution of the depth-fighting problem. Here is my plan that involves this extension:

    1) Using glClipControl(GL_LOWER_LEFT,GL_ZERO_TO_ONE) we set the clipping volume to be:
    0<=Zc<=Wc
    It is important that the range is not -Wc<=Zc<=Wc for the approach described below. Or it is not?.. I am confused... Somewhy I was sure it is, but now... Hm... Maybe I just confused myself...

    2) Configure the projection matrix like this:
    Code :
        | f/aspect  0      0      0    |
        |                              |
        |    0      f      0      0    |
    P = |                              |
        |    0      0      0    zNear  |
        |                              |
        |    0      0     -1      0    |
     
    f = ctan(View_Angle_Vertical / 2);
    aspect = Viewport.x / Viewport.y;
    zNear: distance to the near clipping plane (tiny constant, like 0.0000...1).
    Therefore, the depth value (assuming default direct mapping of depth values) is calculated as follows:
    Depth = zNear / -z
    As a result, all pixels behind the clipping plane have their depth values laying outside [0...1] region, so those are culled; for the fragments sitting on the clipping plane the depth is 1.0, for all further fragments the depth approaches positive zero.

    3) As depth is reversed (the further the fragment the smaller the depth) we must set glDepthFunc(GL_GREATER) to make the depth test working properly.

    4) And the final part, which brings sense to all that: we must use the floating-point z-buffer. Most values of the depth will be concentrated in near-zero region, that is why we need the help of exponential part of FP to prevent the loss of precision for near-zero values.
    Last edited by Yandersen; 11-30-2014 at 10:24 AM.

  6. #6
    Junior Member Regular Contributor
    Join Date
    Dec 2010
    Location
    Oakville, ON, CA
    Posts
    165
    Quote Originally Posted by Yandersen View Post
    1) Using glClipControl(GL_LOWER_LEFT,GL_ZERO_TO_ONE) we set the clipping volume to be:
    0<=Zc<=Wc
    It is important that the range is not -Wc<=Zc<=Wc for the approach described below. Or it is not?.. I am confused... Somewhy I was sure it is, but now... Hm... Maybe I just confused myself...
    Oh, I finally remembered why it was so important! In the setup described above the clipping volume is limited by the area in front of the camera plane only (-z>=zNear). As the result, all clipped z values lay in [1...0) range. So there are no z values in [-1...0] range - those fragments behind the projection plane are all culled. But without ARB_clip_control the mapping of z to depth values converts [-1...1] range to [0...1] range, so depth will range from 0.5 to 1.0 in our case. This indirect mapping will result in loss of FP precision because 0.5 will be added to near-zero values of upcoming fragment's depth, which will vanish the trick. To make it work properly we need to enforce the direct mapping, which becomes available with glClipControl(GL_LOWER_LEFT,GL_ZERO_TO_ONE).
    Alternatively, the trick could be made with glDepthRange(-1,1), but unfortunately the specs says that far and near values are clamped to [0...1] range, so no hope here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •