Skip to content

Print something when WebGLRenderingContext fails #255

Open

Description

@remorses

gl currently silently returns null if WebGLRenderingContext fails (i assume because of missing dynamic libraries or undefined symbols)

Why not print the error in the console? debugging is very difficult this way

try {
ctx = new WebGLRenderingContext(
1,
1,
contextAttributes.alpha,
contextAttributes.depth,
contextAttributes.stencil,
contextAttributes.antialias,
contextAttributes.premultipliedAlpha,
contextAttributes.preserveDrawingBuffer,
contextAttributes.preferLowPowerToHighPerformance,
contextAttributes.failIfMajorPerformanceCaveat)
} catch (e) {}
if (!ctx) {
return null
}

Activity

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