mirror of
https://github.com/leozide/leocad
synced 2025-01-30 20:34:56 +01:00
Enabled alpha test when drawing grid studs.
This commit is contained in:
parent
081373742e
commit
33caa613e7
1 changed files with 3 additions and 0 deletions
|
@ -1726,6 +1726,8 @@ void View::DrawGrid()
|
|||
{
|
||||
mContext->BindTexture2D(gGridTexture->mTexture);
|
||||
glEnable(GL_BLEND);
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glAlphaFunc(GL_GREATER, 0.25f);
|
||||
|
||||
mContext->SetMaterial(LC_MATERIAL_UNLIT_TEXTURE_MODULATE);
|
||||
mContext->SetColor(lcVector4FromColor(Preferences.mGridStudColor));
|
||||
|
@ -1733,6 +1735,7 @@ void View::DrawGrid()
|
|||
mContext->SetVertexFormat(0, 3, 0, 2, 0, false);
|
||||
mContext->DrawPrimitives(GL_TRIANGLE_STRIP, 0, 4);
|
||||
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
BufferOffset = 4 * 5 * sizeof(float);
|
||||
|
|
Loading…
Add table
Reference in a new issue