Skip to content

Unexpected "OpenGL ES 3.0 (WebGL 1.0)" reported by glGetString(GL_VERSION) #13295

Closed

Description

@gkv311

I have observed a strange behavior of a sample 3D viewer application on Safari 14 (on both macOS and iOS) and Chrome (iOS 12.5.1).
glGetString(GL_VERSION) in application returns "OpenGL ES 3.0 (WebGL 1.0)" which makes no sense to me.

Application is build with -s USE_WEBGL2=1 option, which in my understanding should report OpenGL ES 2.0 when browser creates WebGL 1.0 context and OpenGL ES 3.0 for WebGL 2.0. And this is how it actually works on desktop browsers (like disabling webgl.enable-webgl2 in Firefox browser), but for some reason - not on iPad.

First, I would like to understand if it is a bug or expected behavior. In latter case - I would appreciate some details what does it mean, as created "OpenGL ES 3.0 (WebGL 1.0)" is certainly broken. I have also tried to enable WebGL 2.0 in iPad experimental features, which bring "OpenGL ES 3.0 (WebGL 2.0)" with proper GLSL compiler, but has been broken in other GLES 3.0 aspects - but this is kind of expected, as it is "experimental". What I don't expect is "OpenGL ES 3.0 (WebGL 1.0)" thing - as far as I understand, this string is generated by Emscripten, so it couldn't be a Browser bug...

By the way, I have suddenly found that -s USE_WEBGL2=1 is no more listed in recent documentation. I see there is -s MAX_WEBGL_VERSION=2 now, but cannot find when this has been changed and if there is a difference between old/new flags.
So far I've tried Emscripten 2.0.11.

image

Activity

  1. gkv311 commented on Jan 24, 2021

    @gkv311
    ContributorAuthor

    Probably related to #10020, as using MAX_WEBGL_VERSION=2 instead of USE_WEBGL2=1 seems to be fixes the issue, although I don't understand how.

  2. added 3 commits that reference this issue on Mar 15, 2021
    2055ee7
    92471c3
    7d9e154
  3. added a commit that references this issue on Mar 17, 2021
    937533b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions