Search code examples
openglrenderinginvariants

OpenGL deterministic rendering between GPU vendor


I'm currently programming a scientific imaging application using OpenGL.

I would like to know if OpenGL rendering (in term of retrieved pixel from FBO) is supposed to be fully deterministic when my code (C++ / OpenGL and simple GLSL) is executed on different hardware (ATI vs NVidia, various NVidia generations and various OS)?

More precisely, I'd need the exact same pixels buffer everytime I run my code on any hardware (that can runs basic GLSL and OpenGL 3.0)...

Is that possible? Is there some advice I should consider?

If it's not possible, is there a specific brand of video card (perhaps Quadro?) that could do it while varying the host OS?


Solution

  • From the OpenGL spec (version 2.1 appendix A):

    The OpenGL specification is not pixel exact. It therefore does not guarantee an exact match between images produced by different GL implementations. However, the specification does specify exact matches, in some cases, for images produced by the same implementation.

    If you disable all anti-aliasing and texturing, you stand a good chance of getting consistent results across platforms. However, if you need antialiasing or texturing or a 100% pixel-perfect guarantee, use software rendering only: http://www.mesa3d.org/