Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: gl.hasSRGBExt is null #1

Closed
javagl opened this issue Jun 3, 2017 · 6 comments
Closed

TypeError: gl.hasSRGBExt is null #1

javagl opened this issue Jun 3, 2017 · 6 comments
Labels

Comments

@javagl
Copy link
Contributor

javagl commented Jun 3, 2017

This appears in the live demo, on FireFox 52.1.2, Windows (32bit), GeForce 8800 GT.

Most likely an issue of outdated drivers or so (this is not my "real" PC), but maybe it can or should somehow be handled, I'm not sure how common this extension is.

Stack trace:

TypeError: gl.hasSRGBExt is null[Learn More]  scene.js:230:92
    initTextures http://github.khronos.org/glTF-WebGL-PBR/scene.js:230:92
    Mesh http://github.khronos.org/glTF-WebGL-PBR/scene.js:49:30
    Scene http://github.khronos.org/glTF-WebGL-PBR/scene.js:323:30
    updateModel/<.success http://github.khronos.org/glTF-WebGL-PBR/main.js:86:25
    jQuery.Callbacks/fire http://github.khronos.org/glTF-WebGL-PBR/jquery-3.1.1.js:3305:11
    jQuery.Callbacks/self.fireWith http://github.khronos.org/glTF-WebGL-PBR/jquery-3.1.1.js:3435:7
@emackey
Copy link
Member

emackey commented Jun 4, 2017

Thanks for writing this up. I've reproduced this on two other copies of Firefox (one on Windows 10, one on Windows 7, with updated-this-year drivers). Also, this appears to affect Edge as well.

/cc @snagy any thoughts here? Can we treat the sRGB extension as optional? Or can we look for WebGL 2 support with sRGB in core, which seems to enjoy wider browser support than the sRGB extension for WebGL 1?

@emackey emackey added the bug label Jun 4, 2017
@javagl
Copy link
Contributor Author

javagl commented Jun 4, 2017

Just for reference: This seems to be the same as #3 (where @cx20 explicitly listed the cases where this error happens)

@emackey
Copy link
Member

emackey commented Jun 4, 2017

I merged a workaround in #6 that falls back on gl.RGBA when sRGB_EXT is not present. This allows the project to load on Firefox and Edge.

I'm still looking for feedback on whether this is the "right" thing to do, or if there is a better way.

@javagl
Copy link
Contributor Author

javagl commented Jun 5, 2017

Works on my "real" PC. I'll test it with the old one ASA I have the chance, but until then, assume that the issue is fixed now. (Sorry, no other (technical) feedback from me for this point - I'm not familiar with the details of GL texture handling, color spaces, HDR etc...)

@javagl javagl closed this as completed Jun 5, 2017
@snagy
Copy link
Contributor

snagy commented Jun 5, 2017

@emackey I think your solution is the right way to handle it. This was my oversight in the previous revision. Thanks for the fix!

@emackey
Copy link
Member

emackey commented Jun 5, 2017

Thanks @snagy!

emackey pushed a commit that referenced this issue Jul 8, 2017
emackey pushed a commit that referenced this issue Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants