first commit
This commit is contained in:
31
framework/Engine.js
Normal file
31
framework/Engine.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Memory } from "./Memory.js";
|
||||
|
||||
import { RenderSystem } from "./RenderSystem.js";
|
||||
|
||||
export class Engine {
|
||||
|
||||
constructor( device ) {
|
||||
|
||||
this.device = device;
|
||||
this.memory = new Memory( "engine" );
|
||||
this.pipelines = [];
|
||||
|
||||
this.renderSystem = null;
|
||||
|
||||
}
|
||||
|
||||
addPipeline( p ) {
|
||||
|
||||
this.pipelines.push( p );
|
||||
|
||||
}
|
||||
|
||||
|
||||
createRenderSystem( canvas ) {
|
||||
|
||||
this.renderSystem = new RenderSystem( this.device, canvas );
|
||||
|
||||
return this.renderSystem;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user