Skip to content

Unexpected "OpenGL ES 3.0 (WebGL 1.0)" reported by glGetString(GL_VER… #13497

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/library_webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,12 @@ var LibraryGL = {
var handle = GL.getNewId(GL.contexts);
#endif // USE_PTHREADS

// workaround Safari bug returning WebGL 1.0 context by canvas.getContext("webgl2") if WebGL context was already created
var majVerWebGl = (typeof WebGL2RenderingContext === 'undefined' || !(ctx instanceof WebGL2RenderingContext)) ? 1 : webGLContextAttributes.majorVersion;
var context = {
handle: handle,
attributes: webGLContextAttributes,
version: webGLContextAttributes.majorVersion,
version: majVerWebGl,
GLctx: ctx
};

Expand Down