mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-13 12:40:04 +00:00
Merge branch 'shader_line_numbering' into 'master'
Correctly resetting line numbering during shader processing. See merge request OpenMW/openmw!317
This commit is contained in:
commit
bca698d951
@ -92,7 +92,7 @@ namespace
|
||||
"\n"
|
||||
"void bar() { foo() }\n"
|
||||
"\n"
|
||||
"#line 2 0\n"
|
||||
"#line 1 0\n"
|
||||
"\n"
|
||||
"void main() { bar() }\n";
|
||||
EXPECT_EQ(shader->getShaderSource(), expected);
|
||||
|
@ -106,7 +106,7 @@ namespace Shader
|
||||
else
|
||||
{
|
||||
lineDirectivePosition = 0;
|
||||
lineNumber = 1;
|
||||
lineNumber = 0;
|
||||
}
|
||||
lineNumber += std::count(source.begin() + lineDirectivePosition, source.begin() + foundPos, '\n');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user