Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 844 vs 846 for /trunk/Source Code/Platform/Video/OpenGL/Shaders/glShader.cpp

Diff revisions: vs.
  @@ -79,7 +79,7 @@
79 79
80 80 _usedAtoms.clear();
81 81 stringImpl parsedSource = _skipIncludes ? source
82 - : preprocessIncludes(source, getName(), 0);
82 + : preprocessIncludes(source, 0);
83 83
84 84 const char* src = parsedSource.c_str();
85 85
  @@ -131,9 +131,7 @@
131 131 return true;
132 132 }
133 133
134 - stringImpl glShader::preprocessIncludes(const stringImpl& source,
135 - const stringImpl& filename,
136 - I32 level /*= 0 */) {
134 + stringImpl glShader::preprocessIncludes(const stringImpl& source, I32 level /*= 0 */) {
137 135 if (level > 32) {
138 136 Console::errorfn(Locale::get(_ID("ERROR_GLSL_INCLUD_LIMIT")));
139 137 }
  @@ -148,7 +146,7 @@
148 146
149 147 while (std::getline(input, line)) {
150 148 if (std::regex_search(line, matches, Paths::g_includePattern)) {
151 - include_file = matches[1].str().c_str();
149 + include_file = Util::Trim(matches[1].str().c_str());
152 150 _usedAtoms.push_back(include_file);
153 151
154 152 ShaderType typeIndex = ShaderType::COUNT;
  @@ -180,7 +178,7 @@
180 178 line_number,
181 179 include_file.c_str());
182 180 }
183 - output.append(preprocessIncludes(include_string, include_file, level + 1));
181 + output.append(preprocessIncludes(include_string, level + 1));
184 182 } else {
185 183 output.append(line);
186 184 }