Skip to content

getParameter(MAX_TEXTURE_MAX_ANISOTROPY_EXT) fails incorrectly on a restored WebGLContext #27

@WesselKroos

Description

@WesselKroos

The first time a WebGLContext is created this goes correctly. But when a lost WebGLContext was restored by Chrome and I'm getting the MAX_TEXTURE_MAX_ANISOTROPY_EXT parameter the following error message is thrown:
error in getParameter(MAX_TEXTURE_MAX_ANISOTROPY_EXT): INVALID_ENUM

The extension is enabled because getExtension('EXT_texture_filter_anisotropic').MAX_TEXTURE_MAX_ANISOTROPY_EXT is 34047.

My code:

const tfaExt = (
  gl.getExtension('EXT_texture_filter_anisotropic') ||
  gl.getExtension('MOZ_EXT_texture_filter_anisotropic') ||
  gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic')
);
if(tfaExt) {
  let max = gl.getParameter(tfaExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
}

PS: The same problem is happening with gl.texParameteri(gl.TEXTURE_2D, tfaExt.TEXTURE_MAX_ANISOTROPY_EXT, 2)) resulting in the error message: error in getParameter(MAX_TEXTURE_MAX_ANISOTROPY_EXT): INVALID_ENUM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions