Skip to content

Minor improvements for WebGL 2 and development. #317

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

null77
Copy link

@null77 null77 commented May 7, 2025

  • Basic support for texSubImage3D.
  • Code support for Renderdoc, which is enabled via a define.
  • Fix for nodejs issue with detecting instances of buffer types.
  • Simple conversion for RGBA->RED pixel formats on texture upload.

@dhritzkiv another small set of fixes/changes. If the RenderDoc stuff isn't welcome I can remove it, but it's useful to have locally.

- Basic support for texSubImage3D.
- Code support for Renderdoc, which is enabled via a define.
- Fix for nodejs issue with detecting instances of buffer types.
- Simple conversion for RGBA->RED pixel formats on texture upload.
data instanceof Int32Array ||
data instanceof Float32Array ||
data instanceof Float64Array
return isInstanceOfType(data, 'Uint8Array') ||
Copy link
Member

@dhritzkiv dhritzkiv May 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you briefly describe the issues in node with checking if it's a typed array with instanceof ? Something to do with tests / use in a vm module?

This looks fine, I'm more curious for myself – and perhaps there's a another, simpler yet still foolproof version.

}

if (
typeof pixels === 'object' &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely don't need this line, as it's checked for in the previous if statement

@dhritzkiv
Copy link
Member

Overall, looks good.

I think RenderDoc support is a good addition, especially since it's optional, and doesn't look too substantial to maintain.

Would you mind adding a few lines to the README about RenderDoc support in headless-gl? Anything that might be useful to other devs looking to debug their program (unless there's nothing else to be done other than defining RENDERDOC_ENABLED and running RenderDoc)

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

Successfully merging this pull request may close these issues.

2 participants