mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-15 14:56:36 +00:00
Correctly resetting line numbering during shader processing.
This commit is contained in:
parent
21fa55de8e
commit
d5450a7d88
2 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ namespace
|
||||||
"\n"
|
"\n"
|
||||||
"void bar() { foo() }\n"
|
"void bar() { foo() }\n"
|
||||||
"\n"
|
"\n"
|
||||||
"#line 2 0\n"
|
"#line 1 0\n"
|
||||||
"\n"
|
"\n"
|
||||||
"void main() { bar() }\n";
|
"void main() { bar() }\n";
|
||||||
EXPECT_EQ(shader->getShaderSource(), expected);
|
EXPECT_EQ(shader->getShaderSource(), expected);
|
||||||
|
|
|
@ -106,7 +106,7 @@ namespace Shader
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lineDirectivePosition = 0;
|
lineDirectivePosition = 0;
|
||||||
lineNumber = 1;
|
lineNumber = 0;
|
||||||
}
|
}
|
||||||
lineNumber += std::count(source.begin() + lineDirectivePosition, source.begin() + foundPos, '\n');
|
lineNumber += std::count(source.begin() + lineDirectivePosition, source.begin() + foundPos, '\n');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue