-
Notifications
You must be signed in to change notification settings - Fork 155
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
Consider to change preserveDrawingBuffer to false for webgl context #15
Comments
Hi Georg, As part of a change to support passing in options to the VideoContext's constructor I've added a way to pass in custom context attributes to the underlying WebGL context. It can be used like the following: var videoContextOptions = {webglContextAttributes: {preserveDrawingBuffer: true, alpha: false}};
var videoContext = new VideoContext(canvas, undefined, videoContextOptions); The default context attributes for the webGL context are: {preserveDrawingBuffer: true, alpha: false} Changing things away from the default should be considered undefined behaviour for now. But it should give you the functionality required to experiment to find optimal parameters for mobile. Feel free to re-open this issue if this doesn't provide the required functionality. EDIT: This is now available on NPM as version 0.19.0. Kind regards, |
Hmm, on second thoughts I'll reopen this issue as a reminder that we might want to change the default setting for Kind regards, |
I plan to use the library not only for desktop, but also for mobile phones, thus performance is important to me.
I've read that especially low performance devices would benefit from a "perserveDrawingBuffer": false situation, where the graphics driver can swap instead of copy the frame buffer. At the moment, the VideoContext constructor always uses "preserveDrawingBuffer: true.
I want to open this issue to make sure we can check (later on) whether this is possible for the implementation and how big the performance speedup is on low end devices.
Some links for reference:
http://stackoverflow.com/questions/27746091/preservedrawingbuffer-false-is-it-worth-the-effort
https://www.khronos.org/webgl/public-mailing-list/archives/1110/msg00003.php
Georg
The text was updated successfully, but these errors were encountered: