main.ts 779 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. sys_init();
  18. scene_set_active("Scene");
  19. uniforms_ext_init();
  20. render_path_base_init();
  21. render_path_deferred_init(); // Allocate gbuffer
  22. if (context_raw.render_mode == render_mode_t.FORWARD) {
  23. render_path_forward_init();
  24. render_path_commands = render_path_forward_commands;
  25. }
  26. else {
  27. render_path_commands = render_path_deferred_commands;
  28. }
  29. base_init();
  30. }
  31. main();