Skip to content

Commit

Permalink
drawing a points mesh with the default shader doesn't cause an error.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Aug 9, 2024
1 parent 0ca8cb4 commit 1b8a501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/graphics/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ void Mesh::drawInternal(Graphics *gfx, const Matrix4 &m, int instancecount, Buff
flush();

if (Shader::isDefaultActive())
Shader::attachDefault(Shader::STANDARD_DEFAULT);
Shader::attachDefault(primitiveType == PRIMITIVE_POINTS ? Shader::STANDARD_POINTS : Shader::STANDARD_DEFAULT);

if (Shader::current)
Shader::current->validateDrawState(primitiveType, texture);
Expand Down

0 comments on commit 1b8a501

Please sign in to comment.