Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Support for shader compositing #4

Open
kvark opened this issue Feb 23, 2015 · 2 comments
Open

Support for shader compositing #4

kvark opened this issue Feb 23, 2015 · 2 comments

Comments

@kvark
Copy link
Member

kvark commented Feb 23, 2015

Technique interface assumes it's an immutable thing. With shader composting, we might not want to pre-compile all the programs in advance (even though it would work now, and it's not a bad idea to prevent hitches on the way). If a technique wants to link shader programs, it also probably wants to cache them.

It's just a matter of changing self on Technique::compile, we can do it in a backward-compatible manner later.

@kvark
Copy link
Member Author

kvark commented Mar 15, 2015

Alternatively, one can just use RefCell to cache programs inside the Technique implementation to hack around &self.

@kvark
Copy link
Member Author

kvark commented May 4, 2015

Another problem is that creating new programs on the fly requires &mut Factory, which is nowhere near. I need to ether change the interface to include it as a param (with &mut self), or find another way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant