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

gl.getParameter(gl.ARRAY_BUFFER_BINDING) returns outdated value #1509

Open
3 tasks
Pessimistress opened this issue Sep 30, 2021 · 0 comments
Open
3 tasks

gl.getParameter(gl.ARRAY_BUFFER_BINDING) returns outdated value #1509

Pessimistress opened this issue Sep 30, 2021 · 0 comments
Assignees

Comments

@Pessimistress
Copy link
Collaborator

Reported in visgl/deck.gl#6224 (comment)

Actual Result

When querying the bound buffer, gl.getParameter(gl.ARRAY_BUFFER_BINDING) always returns the bound buffer when it was queried the first time.

Expected Result

gl.getParameter(gl.ARRAY_BUFFER_BINDING) should return the currently bound buffer.

Reproduce Steps

const gl = createGLContext();
const buffer = new Buffer(gl, {});

console.log(gl.getParameter(gl.ARRAY_BUFFER_BINDING));

buffer.bind();
console.log(gl.getParameter(gl.ARRAY_BUFFER_BINDING));

buffer.unbind();
console.log(gl.getParameter(gl.ARRAY_BUFFER_BINDING));

Result: null, null, null

Comment out the first console.log and the result is WebGLBuffer {}, WebGLBuffer {}

To Do List

  • Add label and assign to milestone
  • Coding
  • Test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant