diff options
author | amarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 23:17:56 +0000 |
---|---|---|
committer | amarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-23 23:17:56 +0000 |
commit | bc3ef7faa993606415465cc3a036b5f3af9de660 (patch) | |
tree | 69c51db29737194ed207c84c6235a18779a3e91c /o3d/converter/cross/converter_main.cc | |
parent | 1eb71d721dee36e8f386bdc0900f915a0813981a (diff) | |
download | chromium_src-bc3ef7faa993606415465cc3a036b5f3af9de660.zip chromium_src-bc3ef7faa993606415465cc3a036b5f3af9de660.tar.gz chromium_src-bc3ef7faa993606415465cc3a036b5f3af9de660.tar.bz2 |
Adds --convert-cg-to-glsl to the Collada converter tool.
Review URL: http://codereview.chromium.org/1750008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/converter/cross/converter_main.cc')
-rw-r--r-- | o3d/converter/cross/converter_main.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/o3d/converter/cross/converter_main.cc b/o3d/converter/cross/converter_main.cc index 9af930f..ab72b61 100644 --- a/o3d/converter/cross/converter_main.cc +++ b/o3d/converter/cross/converter_main.cc @@ -69,6 +69,9 @@ int CrossMain(int argc, char**argv) { const CommandLine* command_line = CommandLine::ForCurrentProcess(); FilePath in_filename, out_filename; + const FilePath converter_tool = FilePath(argv[0]).DirName().Append( + o3d::UTF8ToFilePath("convert.py")); + std::vector<std::wstring> values = command_line->GetLooseValues(); if (values.size() == 1) { @@ -109,7 +112,12 @@ int CrossMain(int argc, char**argv) { << " directory named archive/ and writes files inside.\n" << "--convert-dds-to-png\n" << " Convert all DDS textures to PNGs. For cube map textures,\n" - << " writes six separate PNGs with suffixes _posx, _negx, etc.\n"; + << " writes six separate PNGs with suffixes _posx, _negx, etc.\n" + << "--convert-cg-to-glsl\n" + << " Convert shaders using an external tool.\n" + << "--converter-tool=<filename> [default: " + << converter_tool.value() << "]\n" + << " Specifies the shader converter tool.\n"; return EXIT_FAILURE; } @@ -119,6 +127,10 @@ int CrossMain(int argc, char**argv) { options.binary = !command_line->HasSwitch("no-binary"); options.archive = !command_line->HasSwitch("no-archive"); options.convert_dds_to_png = command_line->HasSwitch("convert-dds-to-png"); + options.convert_cg_to_glsl = command_line->HasSwitch("convert-cg-to-glsl"); + options.converter_tool = command_line->HasSwitch("converter-tool") ? + o3d::WideToFilePath(command_line->GetSwitchValue("converter-tool")) : + converter_tool; if (command_line->HasSwitch("base-path")) { options.base_path = o3d::WideToFilePath( command_line->GetSwitchValue("base-path")); |