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

Re: [Public WebGL] Texture formats matrix

On Mon, Aug 5, 2013 at 2:53 AM, Kirill Prazdnikov <kirill.prazdnikov@jetbrains.com> wrote:


Where can I find information about how to query which texture formats are supported on my current platform ?

According to glTexImage2D spec it should be { GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA }.
Is all of that should be supported on all platforms?

Yes, all those are part of the base spec.  Things beyond that, like compressed texture formats, are handled as extensions (http://www.khronos.org/registry/webgl/extensions/).   For how to use compressed texture extensions, see tojicode's article: http://blog.tojicode.com/2011/12/compressed-textures-in-webgl.html

The extensions supported by an implementation can be found by calling gl.getSupportedExtensions().

Hope that helps!