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 4 of 4

Thread: GLdouble

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2007
    Posts
    249

    GLdouble

    Does anything in opengl work with double precision ?
    Ie if you load a matrix using glLoadMatrixd

    would it just internally be converted to a float matrix instead of double ?

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,079
    Yes, but no in "Legacy OpenGL". Double precision is supported through GL_ARB_gpu_shader_fp64 and GL_ARB_vertex_attrib_64bit extensions, but it requires SM5 hardware (OpenGL 4.0+) and support in driver.
    I'm not aware of drivers that uses double precision for any of gl*d commands.
    Last edited by Aleksandar; 01-08-2013 at 03:35 PM.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    985
    It's not just gl*d commands like glLoadMatrixd aren't done using double precision in the driver, they shouldn't be done. The spec says that.
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

  4. #4
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009
    Location
    Ontario
    Posts
    304
    Double precision computation can also be much slower than single, anywhere from 2x slower to 24x slower. And there is some GL4 hardware that doesn't support it at all (AMD 5700 series and lower, I believe). So it's a good idea to be sure that you actually need it.

    Multiplying matrices on the CPU side in 64b is still a good idea though, before uploading to GL.

Posting Permissions

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