Add auto context restoration
This commit is contained in:
parent
40b9644171
commit
2e57f090e6
14 changed files with 352 additions and 136 deletions
|
|
@ -19,11 +19,12 @@ export default abstract class Program implements IProgram {
|
|||
|
||||
public async initialize(
|
||||
[vertexShaderSource, fragmentShaderSource]: [string, string],
|
||||
substitutions: { [name: string]: string }
|
||||
substitutions: { [name: string]: string },
|
||||
compiler: ParallelCompiler
|
||||
): Promise<void> {
|
||||
substitutions = { ...substitutions };
|
||||
|
||||
this.program = await ParallelCompiler.createProgram(
|
||||
this.program = await compiler.createProgram(
|
||||
vertexShaderSource,
|
||||
fragmentShaderSource,
|
||||
substitutions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue