[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Size of GL_FLOAT
- To: Carl van Heezik <firstname.lastname@example.org>
- Subject: Re: [Public WebGL] Size of GL_FLOAT
- From: Kenneth Russell <email@example.com>
- Date: Tue, 12 Jan 2010 12:02:56 -0800
- Cc: public webgl <firstname.lastname@example.org>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1263326579; bh=0aY/Ki3PH0Me9wZWsF+m+raPY4g=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=x/C6CWN0OEe3G8ys+3CTteQQh5Bl5JhFlMGMuxwZVW3B0caM9cNjPQ0zSNIlfQFDq CUKPZOqN6GqDDedPXeKKQ==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:x-system-of-record; b=MIGrfXGEbcPk35CifcI3BV2tGu2ARB183oZfcwO183xkIX4MeK26qtx5MkHdw/Eop J2y2hmMCvaAwmglCz93TA==
- In-reply-to: <5EE6D57B-500E-4FB7-8B84-8CECA4D80DB5@microcan.nl>
- References: <5EE6D57B-500E-4FB7-8B84-8CECA4D80DB5@microcan.nl>
- Sender: email@example.com
On Tue, Jan 12, 2010 at 12:30 AM, Carl van Heezik <firstname.lastname@example.org> 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.