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

@luma.gl/webgl clear func causing an error #1903

Open
sakitam-fdd opened this issue Dec 27, 2023 · 3 comments
Open

@luma.gl/webgl clear func causing an error #1903

sakitam-fdd opened this issue Dec 27, 2023 · 3 comments
Labels
Milestone

Comments

@sakitam-fdd
Copy link
Contributor

The status related to stencil seems to be set to the depth state, and I am not sure if this is intentional or a bug

https://github.com/visgl/luma.gl/blob/master/modules/webgl/src/classic/clear.ts#L53-L58

image

image

@ibgreen
Copy link
Collaborator

ibgreen commented Jan 9, 2024

It looks like you are debugging your app with spector js and spector tries to read some data from luma.gl and does not see what it expected?

Not sure how to help you debug this.

@sakitam-fdd
Copy link
Contributor Author

sakitam-fdd commented Jan 9, 2024

@ibgreen
It occurs when clear is called, as shown in the following code

import { Framebuffer, Renderbuffer, Texture2D, clear } from '@luma.gl/webgl';

// other render pass
clear(this.gl, {
  color: true,
  stencil: true,
  // depth: false,
});

The error was raised when the depth parameter was not specified, and I noticed that when stencil was specified without depth, clearStencil had a value of null

if (stencil) {
  clearFlags |= GL_STENCIL_BUFFER_BIT;
  if (depth !== true) {
    parameters.clearStencil = depth;
  }
}

image

@ibgreen
Copy link
Collaborator

ibgreen commented Jan 9, 2024

OK understood, yes it looks like a bug.

@ibgreen ibgreen added the bug label Jan 9, 2024
@ibgreen ibgreen added this to the 9.0.0 milestone Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants