dungeon_crawler
diff prototype/src/cfg.cc @ 60:aa86119e3295
added multipass deferred
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 25 Sep 2012 06:19:37 +0300 |
parents | d52711f2b9a1 |
children |
line diff
1.1 --- a/prototype/src/cfg.cc Fri Sep 21 05:28:45 2012 +0300 1.2 +++ b/prototype/src/cfg.cc Tue Sep 25 06:19:37 2012 +0300 1.3 @@ -7,13 +7,14 @@ 1.4 1.5 Config::Config() 1.6 { 1.7 - width = 800; 1.8 - height = 600; 1.9 + width = 1280; 1.10 + height = 800; 1.11 stereo = false; 1.12 sound = true; 1.13 level_file = "0.level"; 1.14 tileset_file = "default.tileset"; 1.15 - use_deferred = true; 1.16 + 1.17 + rend = Renderer::any; 1.18 } 1.19 1.20 bool Config::parse_args(int argc, char **argv) 1.21 @@ -33,17 +34,31 @@ 1.22 level_file = argv[++i]; 1.23 } else if(strcmp(argv[i], "-tileset") == 0) { 1.24 tileset_file = argv[++i]; 1.25 - } else if(strcmp(argv[i], "-no-deferred") == 0) { 1.26 - use_deferred = false; 1.27 + } else if(strcmp(argv[i], "-renderer") == 0) { 1.28 + if(strcmp(argv[++i], "mrt") == 0) { 1.29 + rend = Renderer::mrt; 1.30 + } else if(strcmp(argv[i], "mp") == 0) { 1.31 + rend = Renderer::multipass; 1.32 + } else if(strcmp(argv[i], "fwd") == 0) { 1.33 + rend = Renderer::fwd; 1.34 + } else { 1.35 + fprintf(stderr, "invalid renderer specified: %s\n", argv[i]); 1.36 + return false; 1.37 + } 1.38 } else if(strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0) { 1.39 printf("Usage: %s [options]\n", argv[0]); 1.40 - printf(" -s WxH window size (resolution)\n"); 1.41 - printf(" -level <filename> specify which level file to load\n"); 1.42 - printf(" -tileset <filename> specify which tileset to use\n"); 1.43 - printf(" -stereo enable stereoscopic rendering\n"); 1.44 - printf(" -nosound disable sound output\n"); 1.45 - printf(" -no-deferred disable deferred renderer\n"); 1.46 - printf(" -h/-help print usage information and exit\n"); 1.47 + printf(" -s WxH window size (resolution)\n"); 1.48 + printf(" -level <file> specify which level file to load\n"); 1.49 + printf(" -tileset <file> specify which tileset to use\n"); 1.50 + printf(" -renderer <rend> specify which renderer to use\n"); 1.51 + printf(" -stereo enable stereoscopic rendering\n"); 1.52 + printf(" -nosound disable sound output\n"); 1.53 + printf(" -h/-help print usage information and exit\n"); 1.54 + printf("\n"); 1.55 + printf("Renderers:\n"); 1.56 + printf(" mrt - deferred renderer using multiple draw buffers\n"); 1.57 + printf(" mp - multipass deferred renderer for each g-buffer\n"); 1.58 + printf(" fwd - fallback forward renderer with simplistic lighting\n"); 1.59 exit(0); 1.60 1.61 } else {