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

[Public WebGL] Re: texParameteri and texParameterf

(You don't mind that I re-add the list in CC, do you?)

----- Original Message -----
> On Thu, Aug 05, 2010 at 01:34:02PM -0700, Benoit Jacob wrote:
> > Ah OK. I hadn't read the desktop GL spec.
> >
> > I have read the WebGL and GL ES specs and haven't found any clue
> > about whether this should fail or not. Does someone know where this
> > is defined, or should the spec be clarified?
> Need to clarify exactly what you're asking about. You said "an
> integer value". But glTexParameter* can specify either float, int, or
> enum values. For a float or int value, there are well-defined numeric
> conversions; you can specify int values for a parameter that's
> internally float, or vice-versa, and get conversions as described in
> chapter 2 of the GL/ES specs.

Thanks, but this Chapter 2 is 40 pages long; could you please refer to a more specific part of it?

> For an enum value, you in principle could specify it as a float but
> it should only succeed if the conversion is lossless and the result is
> an accepted value for that parameter, per the general description of
> INVALID_ENUM errors also in ch. 2. In practice I wouldn't be surprised
> for there to be some variability in implementations as this is a
> really
> obscure case - nobody in C is likely to write something like
> GLfloat enumVal = (GLfloat)GL_LINEAR;
> glTexParameterfv(GL_TEXTURE2D, GL_TEXTURE_MIN_FILTER, &enumVal);
> or
> (GLfloat)GL_LINEAR);

Ah, thanks, this is exactly what I was inquiring about. I need to have a closer look at that chapter 2.


> Jon
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: