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

Re: [Public WebGL] texImage2D changed...



>> In desperation I tried turning *off* the webgl.shader_validator
>
> Ah OK, crash in the shader validator, you wouldn't be the only one hitting
> that:
> https://bugzilla.mozilla.org/show_bug.cgi?id=585502

Ah - OK - that explains that part!

>> Anyway - I guess that form of texImage2D got obsoleted somehow.
>
> Yes. Did you read this e-mail that Vlad recently sent to this list?
> https://www.khronos.org/webgl/public-mailing-list/archives/1007/msg00034.html

Oooohhh!  My bad!  I did read it - but I got so engrossed in the bit about
the validator that I kinda zoned out on the last part.  I must remember to
get some sleep sometime!

> OK so my guess would be that it's because we in Firefox are currently only
> supporting RGB and RGBA with 8 bytes per channel. Can you try this in
> Chromium, if it works there then that would confirm it. We are looking at
> reusing the nice reusable that Ken wrote there for Chromium.

Yeah - but it'll have to wait for a day or so - I'm not tracking the
Chromium builds currently.

>> So presumably I
>> need to set the two format parameters according to what's actually in
>> the PNG file.
>
> No no, you don't need to. First of all, like in OpenGL ES, the format and
> internalformat parameters are just required to be equal, so yes they are
> redundant.
>
> If your image is an actual Image object or a HTML element, then you really
> don't have to specify the format it's in, the format parameter passed to
> texImage2D only specifies the format in which you want it to be passed to
> the GL; the WebGL implementation does the conversion for you.

Right - but am I wasting texture memory if I set the internalFormat to
RGBA when my file is really a 1 byte monochrome format?   If so, then I
guess I still have to know what file format I have in order to set that
parameter correctly for efficient memory use?

Many thanks!

  -- Steve


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