## Open GL internal mathematics

### Open GL internal mathematics

In doing lighting simulations, we have encountered unexpected results in GL
simulated versus expected outcomes. We believe that this may be due to data
loss in our Open GL code where light levels are very low, causing
"quantization" of pixels. Essentially a dynamic range problem, that's our
best guess.

Can anyone point me to a reference to Open GL's internal math? Is it
floating point or integer?

I should add that we're running under Linux, but i would expect, perhaps
unrealistically, that this kind of thing would be consistent across
platforms

Alexander Polsky

### Open GL internal mathematics

> In doing lighting simulations, we have encountered unexpected results in GL
> simulated versus expected outcomes. We believe that this may be due to data
> loss in our Open GL code where light levels are very low, causing
> "quantization" of pixels. Essentially a dynamic range problem, that's our
> best guess.

> Can anyone point me to a reference to Open GL's internal math? Is it
> floating point or integer?

The implementation is, um,  implementation dependent. :-)

Internal computation can vary widely; it just needs to pass the conformance
suite.

Quote:> I should add that we're running under Linux, but i would expect, perhaps
> unrealistically, that this kind of thing would be consistent across
> platforms

The OpenGL standard leaves a lot of wiggle room for implementations.

--
Andy V (OpenGL Alpha Geek)
"In order to make progress, one must leave the door to the unknown ajar."
Richard P. Feynman, quoted by Jagdish Mehra in _The Beat of a Different Drum_.

### Open GL internal mathematics

> Can anyone point me to a reference to Open GL's internal math? Is it
> floating point or integer?

Yes.

The OpenGL specification that some of the internal computations be conducted
in at least single precision floats, but some need be no more precise than
the depth of the framebuffer.

The OpenGL specification can be found at http://www.opengl.org/

Quote:> I should add that we're running under Linux, but i would expect, perhaps
> unrealistically, that this kind of thing would be consistent across
> platforms

OpenGL has fairly loose precision requirements.
--
Samuel S. Paik | http://www.webnexus.com/users/paik/
3D and multimedia, architecture and implementation
Solyent Green is kitniyos!

### Open GL internal mathematics

> Can anyone point me to a reference to Open GL's internal math? Is it
> floating point or integer?

Yes.

The OpenGL specification that some of the internal computations be conducted
in at least single precision floats, but some need be no more precise than
the depth of the framebuffer.

The OpenGL specification can be found at http://www.opengl.org/

Quote:> I should add that we're running under Linux, but i would expect, perhaps
> unrealistically, that this kind of thing would be consistent across
> platforms

OpenGL has fairly loose precision requirements.
--
Samuel S. Paik | http://www.webnexus.com/users/paik/
3D and multimedia, architecture and implementation
Solyent Green is kitniyos!

### Open GL internal mathematics

Alexander Polsky schrieb:

Quote:

> In doing lighting simulations, we have encountered unexpected results in GL
> simulated versus expected outcomes. We believe that this may be due to data
> loss in our Open GL code where light levels are very low, causing
> "quantization" of pixels. Essentially a dynamic range problem, that's our
> best guess.

> Can anyone point me to a reference to Open GL's internal math? Is it
> floating point or integer?

Mostly float. The spec says all about OpenGL internals and behavior
(what is not described that you can't expect). You should find it
online at http://www.sgi.com/software/opengl

Quote:> I should add that we're running under Linux, but i would expect, perhaps
> unrealistically, that this kind of thing would be consistent across
> platforms

If you are running Linux, perhaps with Mesa, you can look in the Mesa
sources for yourself to find out the internal math and you can change
it if you think, it is not okay.

Thomas
--
links, tips, OpenGL related source at:
http://home.t-online.de/home/thk01/navigate.htm

Analytical Mechanics Associates, Inc. of Hampton VA, is actively seeking
a motivated person with background in spacecraft dynamics and controls,
trajectories, optimization, and an interest in computer graphics.

AMA is a scientific research and development firm which provides:

- virtual reality based design and analysis environments
- collaborative and distributed engineering environments
- guidance and control solutions to challenging aerospace applications
- modeling and simulation of dynamical systems
- computer programming and software solutions

Requirements:
Candidate should possess an M.S./Ph.D. (or B.S. with experience) in
Aerospace/Aeronautical Engineering or Mathematics. Experience in orbital
mechanics, scientific visualization, computer animation, OpenGL, or 3D
toolkits a plus.  U.S. citizenship/permanent residency required.  Work
will be performed at NASA Langley Research Center.

AMA offers competitive salary and excellent benefits.
AMA is an Equal Opportunity Employer.