Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Dec 11, 2024
1 parent f06b8ee commit 60cb5ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/nCine/Graphics/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ namespace nCine
if (batchSize > 0) {
char sourceString[48];
std::int32_t length = formatString(sourceString, sizeof(sourceString), DefineFormatString, BatchSizeDefine, batchSize);
StringView vertexStrings[1] = { StringView(sourceString, length) };
StringView vertexStrings[2] = { StringView(sourceString, length), ResetLineString };
return glShaderProgram_->attachShaderFromStringsAndFile(GL_VERTEX_SHADER, vertexStrings, fs::CombinePath({ theApplication().GetDataPath(), "Shaders"_s, vertexShader }));
} else {
return glShaderProgram_->attachShaderFromFile(GL_VERTEX_SHADER, fs::CombinePath({ theApplication().GetDataPath(), "Shaders"_s, vertexShader }));
Expand Down Expand Up @@ -527,8 +527,8 @@ namespace nCine

if (batchSize > 0) {
char sourceString[48];
std::int32_t length = formatString(sourceString, sizeof(sourceString), BatchSizeFormatString, batchSize);
StringView vertexStrings[2] = { StringView(sourceString, length), vertexShader };
std::int32_t length = formatString(sourceString, sizeof(sourceString), DefineFormatString, BatchSizeDefine, batchSize);
StringView vertexStrings[3] = { StringView(sourceString, length), ResetLineString, vertexShader };
return glShaderProgram_->attachShaderFromStringsAndFile(GL_VERTEX_SHADER, vertexStrings, {});
} else {
return glShaderProgram_->attachShaderFromString(GL_VERTEX_SHADER, vertexShader);
Expand Down

0 comments on commit 60cb5ea

Please sign in to comment.