Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: converter/cross/converter.h

Issue 147192: Updates the o3dConverter to turn on filtering by default... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | converter/cross/converter.cc » ('j') | converter/cross/converter.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 namespace o3d { 44 namespace o3d {
45 namespace converter { 45 namespace converter {
46 46
47 // Options struct for passing to the converter. 47 // Options struct for passing to the converter.
48 struct Options { 48 struct Options {
49 Options() 49 Options()
50 : base_path(FilePath::kCurrentDirectory), 50 : base_path(FilePath::kCurrentDirectory),
51 condition(true), 51 condition(true),
52 up_axis(0, 0, 0), 52 up_axis(0, 0, 0),
53 pretty_print(false) {} 53 pretty_print(false),
54 keep_filters(false),
55 keep_materials(false) {
56 }
54 57
55 // The path to the "base" of the model path, from which all paths 58 // The path to the "base" of the model path, from which all paths
56 // are made relative. Defaults to the current directory. 59 // are made relative. Defaults to the current directory.
57 FilePath base_path; 60 FilePath base_path;
58 61
59 // Indicates if the converter should condition the input shaders or 62 // Indicates if the converter should condition the input shaders or
60 // not. 63 // not.
61 bool condition; 64 bool condition;
62 65
63 // The up axis of the output. The input will be converted to a new coordinate 66 // The up axis of the output. The input will be converted to a new coordinate
64 // system if it indicates a different up axis. Zero means no conversion. 67 // system if it indicates a different up axis. Zero means no conversion.
65 Vector3 up_axis; 68 Vector3 up_axis;
66 69
67 // This indicates whether or not the serialized JSON code should be 70 // This indicates whether or not the serialized JSON code should be
68 // pretty-printed (formatted with spaces and newlines) or just 71 // pretty-printed (formatted with spaces and newlines) or just
69 // emitted as one huge one-line string. Defaults to false. 72 // emitted as one huge one-line string. Defaults to false.
70 bool pretty_print; 73 bool pretty_print;
74
75 // Tells the converter not to set all filters to tri-linear.
76 bool keep_filters;
77
78 // Tells the covnerter not to change materials to constant if they are used
apatrick 2009/06/26 20:04:29 covnerter -> converter
79 // by a mesh that has no normals.
80 bool keep_materials;
71 }; 81 };
72 82
73 // Converts the given file for use in O3D. This is done by 83 // Converts the given file for use in O3D. This is done by
74 // loading the input file, traversing the scene graph and serializing 84 // loading the input file, traversing the scene graph and serializing
75 // what is found there. 85 // what is found there.
76 bool Convert(const FilePath& in_filename, 86 bool Convert(const FilePath& in_filename,
77 const FilePath& out_filename, 87 const FilePath& out_filename,
78 const Options& options, 88 const Options& options,
79 String* error_messages); 89 String* error_messages);
80 90
81 // Verifies the given shader file as "valid". Returns true if input 91 // Verifies the given shader file as "valid". Returns true if input
82 // shader file contains valid code (code that can be compiled 92 // shader file contains valid code (code that can be compiled
83 // successfully). 93 // successfully).
84 bool Verify(const FilePath& in_filename, 94 bool Verify(const FilePath& in_filename,
85 const FilePath& out_filename, 95 const FilePath& out_filename,
86 const Options& options, 96 const Options& options,
87 String* error_messages); 97 String* error_messages);
88 98
89 } // namespace converter 99 } // namespace converter
90 } // namespace o3d 100 } // namespace o3d
91 101
92 #endif // O3D_CONVERTER_CROSS_CONVERTER_H_ 102 #endif // O3D_CONVERTER_CROSS_CONVERTER_H_
OLDNEW
« no previous file with comments | « no previous file | converter/cross/converter.cc » ('j') | converter/cross/converter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698