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: why there is no double version of glUniform?

  1. #1
    Junior Member Newbie
    Join Date
    May 2014
    Posts
    14

    why there is no double version of glUniform?

    I checked the webpage http://www.opengl.org/wiki/GLAPI/glUniform but noticed that glUniform API seems not have double version, i.e., something like glUniform3d for dvec3 uniform variables. Does this API really not support double? If not, why?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    716
    It's available through an extension, see GL_ARB_gpu_shader_fp64. Hardware is only (somewhat) recently acquiring full support for double precision computations. Making double a first class citizen type in the spec would render all implementations that don't support it non-conforming - my guess is that was considered too strict a requirement.

  3. #3
    Junior Member Newbie
    Join Date
    May 2014
    Posts
    14
    Thanks a lot, carsten neumann. I'm so glad to see my GT640 card support GL_ARB_gpu_shader_fp64. Cool!

  4. #4
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009
    Location
    Ontario
    Posts
    315
    Double-precision computation on many GPUs, especially consumer versions, is often much slower than single-precision, by anywhere from 2x - 24x slower. I believe the GT640 FP64 performance is 1/24th that of the FP32 performance. So you might want to use double precision sparingly, only if absolutely necessary.

Posting Permissions

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