[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] texParameteri and texParameterf



On Thu, Aug 5, 2010 at 11:30 AM, Benoit Jacob <bjacob@mozilla.com> wrote:
> Hi,
>
> Do you think that texParameteri and texParameterf could be merged into a single texParameter method that would interprete its 'param' argument either as an int or as a float, depending on the 'pname' argument' ?
>
> Maybe that would be more in line with the rest of our API, and more javascript-ish?
>
> Note that in standard OpenGL ES / WebGL there is currently no float parameter at all, although extensions might add some.

I'm pretty sure there was a specific reason we preserved the i and f
suffixes -- some parameters which can accept either an integer or
floating point value and have slightly different semantics. Jon Leech
would probably remember exactly which ones. They might exist only in
desktop GL. Regardless, I think we should preserve both entry points,
because in JavaScript it's impossible in all cases to determine
whether a given number is supposed to be treated semantically as an
integer or floating-point value.

-Ken
-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: