-
Notifications
You must be signed in to change notification settings - Fork 160
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
Webgl2 3d textures #150
Merged
Merged
Webgl2 3d textures #150
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AFAIK if you're not uploading any data then there's no reason to call generateMipmap?
…ter copies the Buffer object
This commit switches to AMD for the module system and uses webpack/babel to build lib/gli.all.js. This means you can use ES6 code in the source and it should be converted to ES5. It also means there's no need to add files to both the loaded and the buildscript as webpack can figure out the files. The chrome extension works in both release and debug mode and embed.js seems to work in both release and debug mode. Also tested firefox in release. Safari I can't test as the extension no longer works even without these changes. A few caveats: Because the debug mode uses require.js there *may* be issues with using debug mode on pages that use require.js themselves. Non-debug mode should not have that issue. Another issue is in debug mode things are finicky in that it's possible window.onload could fire before `getContext` has been wrapped. At the moment it seems to be working but just in case, for those cases you can (debug mode with embed.js only) you can wait for `gliready` instead of load. In other words assuming you have some code like this window.onload = runMyApp; You'd change it to window.addEventListener('gliready', runMyApp); Again, only when using embed.js in debug mode.
I started adding these because I thought I was going to need more shaders to render textures. It turns out I didn't need to do that but still it seems like a good idea to share some code.
note: still to todo is supporting texImage3D etc... for uploading data
We need this because in WebGL2 samplers are format dependent
This way you can see small images
Probably some major refactoring need to support 3d and 2d array textures
First off how did this ever work. But secondly why did this suddenly start being an issue. What did I change/break Also note that if I debug http://twgljs.org/examples/textures.html and pick to browse all textures I see the live updated texture update live in the preview. Really? Is that's suppose to happen?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one adds previews for 3d textures and 2d texture arrays. I just draw every slice in whatever size preview is shown. Can try to think of something better later but at least it seems to work.
I realized it's going to be a big tedious PITA to support all the texture stuff like PBOs, all the new pixelStore UNPACK_XXX settings, etc.. 😭 Updated the list in #142
BTW: The spec changed. Chrome 55 supports the old spec, Chrome 57 supports the new spec. I haven't checked 56. Works in FirefoxNightly
Should I be checking in my samples in?