[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Few questions/comments about context creation attributes
----- "Cedric Vivier" <firstname.lastname@example.org> wrote:
I'm trying to write some tests for the context creation attributes,
Does anyone have an idea how to do this ? Or is it a kind of tests
that must be done (natively) for every implementation independently ?
Also while testing this part of the API, I realized currently
developers have no way to know or hint the context (pbuffer usually)
destination format, I think all implementations currently hardcode
888, but 888 is not supported on all ES devices, even if supported
performance can be bad compared to 565 rendering, is that a choice
that should be left to WebGL implementations without any control
possible from the developer (quality vs performance sensitive apps) ?
We actually considered this a while ago, and it seemed that the best thing to do for WebGL 1.0 was to leave this up to the WebGL implementation -- the same for alpha/depth/stencil; you can request those, but you have no way to request a specific size. After the context is created you can query to see the exact values that you got (I believe via framebuffer queries). In the future we could extend the WebGL context attributes object to allow specifying these things in more detail. (It wouldn't break compat -- we'd have to add something like minDepth and maxDepth anyway, so it would be just additions.)
If we consider we should give developers choice about this I suggest
we add "red", "green", "blue" members to WebGLContextAttributes
object, defaulting each to 0 (let the implementation decide -
equivalent of EGL_DONTCARE, GLX_DONTCARE, ...), otherwise it is the
number of bits the context must meet or exceed (as per standard
Anyways, I believe we'd better change type of "alpha", "depth" and
"stencil" to integers instead of booleans (once again ;) ), defaulting
to current default values of 8 and 16 respectively; this makes
possible to later accept higher values in WebGL for apps that requires
or prefers higher precision, without having to change the type of
these members in the IDL, breaking compatibility.
You are currently subscribed to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: