[Bug 753640] gl: DepthRange uses raw double instead of GLclampd

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Aug 15 10:23:16 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=753640

--- Comment #5 from Martin Kelly <martin at surround.io> ---
It appears that GLclampd was entirely removed (in favor of GLdouble) starting
with opengl 4.2:
https://www.opengl.org/sdk/docs/man/html/removedTypes.xhtml

AFAICT, double is not guaranteed to be 64 bit or IEEE754; it just has to be a
floating point representation of some kind. In contrast, GLdouble is guaranteed
to be 64 bit IEEE754. On most (all? not sure) machines and compilers, they end
up being the same, but in principle, they don't have to be.

Opengl reference:
https://www.opengl.org/wiki/OpenGL_Type

C reference (I'm sure we could find the actual standard, but this is quick and
handy):
https://en.wikipedia.org/wiki/C_data_types
"Actual properties unspecified (except minimum limits), however on most systems
this is the IEEE 754 double-precision binary floating-point format. This format
is required by the optional Annex F "IEC 60559 floating-point arithmetic."

"The actual size and behavior of floating-point types also vary by
implementation. The only guarantee is that long double is not smaller than
double, which is not smaller than float."

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list