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 ?
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 02:35 PM.
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/
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.