-
Notifications
You must be signed in to change notification settings - Fork 174
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
base: master
Are you sure you want to change the base?
Conversation
data instanceof Int32Array || | ||
data instanceof Float32Array || | ||
data instanceof Float64Array | ||
return isInstanceOfType(data, 'Uint8Array') || |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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' && |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
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 |
- 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.
cbbc01e
to
ccfb19e
Compare
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. |
@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.