Added NzRenderer::[Get/Set]LineWidth

Former-commit-id: 827f762294bb67debb2a7faed07b595df2b9d20d
This commit is contained in:
Lynix
2012-11-01 18:28:49 +01:00
parent 5c2f94f953
commit 1b3129868f
4 changed files with 26 additions and 0 deletions

View File

@@ -196,6 +196,14 @@ void NzRenderer::Enable(nzRendererParameter parameter, bool enable)
break;
}
}
float NzRenderer::GetLineWidth()
{
float lineWidth;
glGetFloatv(GL_LINE_WIDTH, &lineWidth);
return lineWidth;
}
/*
NzMatrix4f NzRenderer::GetMatrix(nzMatrixCombination combination)
{
@@ -505,6 +513,19 @@ bool NzRenderer::SetIndexBuffer(const NzIndexBuffer* indexBuffer)
return true;
}
void NzRenderer::SetLineWidth(float width)
{
#if NAZARA_RENDERER_SAFE
if (width <= 0.f)
{
NazaraError("Width must be over zero");
return;
}
#endif
glLineWidth(width);
}
void NzRenderer::SetMatrix(nzMatrixType type, const NzMatrix4f& matrix)
{
s_matrix[type] = matrix;