Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
null77 wants to merge 1 commit into stackgl:master
base: master
Choose a base branch
Loading
from higharc:minor-webgl2-fixes

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.

monteslu reacted with hooray emoji
datainstanceofInt32Array ||
datainstanceofFloat32Array ||
datainstanceofFloat64Array
return isInstanceOfType(data,'Uint8Array') ||
Copy link
Member

@dhritzkiv dhritzkiv May 13, 2025
edited
Loading

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.

Copy link
Author

Choose a reason for hiding this comment

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

I added a comment to "isInstanceOfType". The issue I think was coming from Webpack, which was supplying some kind of polyfill that broke instanceof. I didn't 100% root cause the issue to the point where I know who was responsible, but I am certain that instanceof was failing in this case and comparing the type string did work properly for our case.

}

if (
typeof pixels === 'object' &&
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.

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

Copy link
Author

Choose a reason for hiding this comment

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

Done.

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)

- 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.
Copy link
Author

null77 commented Sep 29, 2025

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)

Wow, it's been a while since I responded! Thanks for your patience here and giving me the time to address your comments. I added a blurb about RenderDoc in the README, added the RDoc header to the repo, and made some minor improvements to its usability. I did use it to debug some issues we were having. @dhritzkiv PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dhritzkiv dhritzkiv dhritzkiv left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /