Working on assets

This commit is contained in:
2022-12-01 22:37:42 -08:00
parent 535e2b2dc5
commit ba9881e39d
18 changed files with 355 additions and 42 deletions

View File

@ -65,6 +65,14 @@ int32_t DawnHost::init(DawnGame *game) {
auto result = game->init();
if(result != DAWN_GAME_INIT_RESULT_SUCCESS) return result;
// Hard-Load the first scene assets.
if(game->scene != nullptr) {
auto assets = game->scene->getRequiredAssets();
game->assetManager.queueLoad(assets);
game->assetManager.syncLoad();
game->scene->stage();
}
// Set up event listeners
glfwSetWindowSizeCallback(this->data->window, &glfwOnResize);
glfwSetKeyCallback(this->data->window, &glfwOnKey);