How realistic and precise is OpenGL ??

Hi there ,

today i was just wondering how accurate opengl rendering is ?
does anyone know a project were people have compared a rendered 3d szene to a photo taken from reality …
to masure if the positoning is correct.


It’s as accurate as you want to make it.

Your question may have had some meaning in the context of the legacy fixed-function pipeline. But when you’re dealing with modern OpenGL (i.e. OpenGL 3+ core profile), OpenGL itself is just a framework for executing shader programs. So the question becomes one of how accurate any given shader program is.

What made you ask such question? The way it is formulated makes it meaningless. That’s probably why somebody (not me) rated it with a single star.

If you generally ask about realism, probably the best answer could be tech demos that use OpenGL.

If you ask about representing standard lens (without aberrations) with regular projection matrix, have no doubt that it works fine. We have used it many times for matching real outdoor scenes with artificial objects in various VR applications. On the other hand, if you need to simulate lens aberration, then some additional calculation is needed. But, it definitely can be done in OpenGL. Just search the Web and you’ll find a lot of articles (and even scientific papers).

Check your local friendly OpenGL specification, e.g - Appendix A, Invariance typically contains the following text:

The OpenGL specification is not pixel exact.

You also seem to have the misunderstanding that it’s OpenGL itself that does the drawing of a 3D scene. With the exception of a pure software implementation this is not the case. OpenGL doesn’t draw anything; OpenGL is just a means for your program to send commands to your GPU, your GPU is what does the drawing and accuracy depends on your GPU.