Skip to content

BigInt doesn't play nicely with WebGL bindings #800

Closed
@blm768

Description

@blm768

I've been experimenting with the WebGLRenderingContext bindings, and I've discovered that there's a weird interaction between the WebIDL types, wasm-bindgen's type mapping, and what browsers actually support in their WebGL implementations. Basically, there are several methods which take a GLintptr, which is a long long, which wasm-bindgen maps to i64 and BigInt. But the actual API throws an exception if you pass it a BigNum. Using an i32 or u32 seems to work fine.

The simple solution would seem to be changing the definition of GLintptr in the WebIDL, but is there another alternative that isn't so hacky?

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontend:webidlIssues related to the WebIDL frontend to wasm-bindgenweb-sysIssues related to the `web-sys` crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions