Working on assets
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user