Color entire axis arrows.

This commit is contained in:
Leonardo Zide 2020-12-26 11:53:35 -08:00
parent c26b52ea5e
commit ddd8405c7e
2 changed files with 7 additions and 3 deletions

View file

@ -1140,7 +1140,7 @@ const lcCommand gCommands[] =
// LC_VIEW_TOGGLE_GRID
{
QT_TRANSLATE_NOOP("Action", "View.ToggleGrid"),
QT_TRANSLATE_NOOP("Menu", "Grid"),
QT_TRANSLATE_NOOP("Menu", "Base Grid"),
QT_TRANSLATE_NOOP("Status", "Toggle grid"),
""
},

View file

@ -1041,8 +1041,12 @@ void lcView::DrawAxes() const
mContext->SetVertexFormatPosition(3);
mContext->SetIndexBufferPointer(Indices);
mContext->SetColor(0.0f, 0.0f, 0.0f, 1.0f);
mContext->DrawIndexedPrimitives(GL_LINES, 6, GL_UNSIGNED_SHORT, 0);
mContext->SetColor(0.8f, 0.0f, 0.0f, 1.0f);
mContext->DrawIndexedPrimitives(GL_LINES, 2, GL_UNSIGNED_SHORT, 0);
mContext->SetColor(0.0f, 0.8f, 0.0f, 1.0f);
mContext->DrawIndexedPrimitives(GL_LINES, 2, GL_UNSIGNED_SHORT, 2 * 2);
mContext->SetColor(0.0f, 0.0f, 0.8f, 1.0f);
mContext->DrawIndexedPrimitives(GL_LINES, 2, GL_UNSIGNED_SHORT, 4 * 2);
mContext->SetColor(0.8f, 0.0f, 0.0f, 1.0f);
mContext->DrawIndexedPrimitives(GL_TRIANGLES, 24, GL_UNSIGNED_SHORT, 6 * 2);