[Public WebGL] Size of GL_FLOAT

Kenneth Russell [email protected]
Tue Jan 12 12:02:56 PST 2010


On Tue, Jan 12, 2010 at 12:30 AM, Carl van Heezik <[email protected]> wrote:

> I see a lot discussion about the size of of GL_FLOAT. This is my opinion.
>
> There is only one person that needs to know what the size of a variable is
> and that is the programmer that writes the program.
> He needs to know if the variable is big enough for his application. A fixed
> size on every platform, the same number of bytes and
> preferable the same byte order is the best solution. If a hardware vendor
> decides to put a float into a double that is his choice
> but the interface for the programmer should be the same on every platform.
> There should be no gabs in buffers!!! WebGL is
> based on OpenGL ES 2.0 which is targeted to portable devices where every
> byte counts. So please no gabs!! Waisting half the
> memory because the hardware vendor uses a double instead of a float is
> madness! Please keep things simple.
>

There is no intent to leave gaps in buffers. The only question is whether to
allow the possibility of OpenGL implementations which map GLfloat
differently. On platforms that map it to a single-precision floating-point
value there will be no waste of space; adjacent values in a WebGLFloatArray
will be tightly packed in memory.

-Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20100112/97a12f81/attachment.html>


More information about the public_webgl mailing list