main.ts 766 B

12345678910111213141516171819202122232425262728293031323334353637
  1. function main() {
  2. // Used to locate external application data folder
  3. iron_set_app_name(manifest_title);
  4. config_load();
  5. sys_on_resize = base_on_resize;
  6. sys_on_w = base_w;
  7. sys_on_h = base_h;
  8. sys_on_x = base_x;
  9. sys_on_y = base_y;
  10. config_init();
  11. context_init();
  12. sys_start(config_get_options());
  13. if (config_raw.layout == null) {
  14. base_init_layout();
  15. }
  16. iron_set_app_name(manifest_title);
  17. scene_set_active("Scene");
  18. uniforms_ext_init();
  19. render_path_base_init();
  20. render_path_deferred_init(); // Allocate gbuffer
  21. if (context_raw.render_mode == render_mode_t.FORWARD) {
  22. render_path_forward_init();
  23. render_path_commands = render_path_forward_commands;
  24. }
  25. else {
  26. render_path_commands = render_path_deferred_commands;
  27. }
  28. base_init();
  29. }
  30. main();