Exemplo n.º 1
0
func (self *Game) Run() {
	self.window = platform.NewOpenGLWindow(self.config)
	self.window.Open()

	self.entityDB = core.NewEntityDB()
	self.renderer = new(platform.OpenGLRenderer)
	self.Keyboard = input.NewKeyboard(self.window)
	self.Mouse = input.NewMouse(self.window)

	self.InputDispatcher = input.NewInputDispatcher(
		self.config,
		self.Keyboard,
		self.Mouse,
	)

	self.initializeBehaviors()
	self.loadAllMaterials()
	self.loadAllMeshes()
	self.initializeScene()

	self.mainLoop()
}
Exemplo n.º 2
0
func (self *Game) initializePlatform() {
	self.window = platform.NewOpenGLWindow(self.config)
	self.renderer = platform.NewOpenGLRenderer()

	self.window.Open()
}