View Full Version : OpeGL accuracy
09-10-2012, 10:57 AM
I'm new in this forum and I have never dealt with OpenGL.
It seems to be very powerful and I would like to use it for a scientific simulation of a satellite imaging system, but I'm not sure if the algorithms and numeric calculations are enough precise.
Is OpenGL suitable for this purpose? Why?
Thank you very much for your help!
09-10-2012, 11:55 AM
GL is just for rendering graphics. It can be used to run algorithms by using floating point buffers and readback and the float data, but it is better to use either CUDA or OpenCL (compute language) to run algorithms on a GPU.
09-10-2012, 02:07 PM
OpenGL has floats and (slower) double datatypes. HiEnd GPUs support full IEEE float operations, BUT: the OpenGL specs give little guarantee about accuracy. For serious scientistic purposes OpenCL or CUDA might be a better way to go, even if those programs run on the same hardware.
09-11-2012, 02:27 AM
the OpenGL specs give little guarantee about accuracy
I'd like to use it only to perform an orthographic projection of the digital elevation model. Does OpenGL give little guarantee also in the accuracy of the geometric projection?
09-21-2012, 03:27 AM
I think it depends on the graphics hardware. If you pass OpenGL a double, it will just cast it to a float again,
if the underlining hardware doesn't support double precision.
09-23-2012, 09:43 AM
OpenGL can only be as accurate as the underlying hardware. If the hardware uses 16-bit floating point internally, then that's what you'll get; if it uses higher precision then you'll also get higher precision, but in general you can't rely on OpenGL alone for this kind of accuracy (what you can rely on it for is repeatability). OpenGL is also just intended for use with visualization; if you want to use OpenGL to visualize the results of a calculation (which may be done with higher precision elsewhere; e.g. a custom math library running on your CPU) then you've made a good choice. If you want to use OpenGL to actually do those calculations itself - not so good; that's outside of the problem domain that OpenGL provides a solution for.
10-10-2012, 12:30 AM
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.