1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0026790: Visualization, TKOpenGl - apply view resolution to the line width in OpenGl_Context::SetLineWidth()

Add ResolutionRatio() method in the Graphic3d_RenderingParams.
Add SetResolutionRatio() method in the OpenGl_Context.
This commit is contained in:
isk
2015-11-11 08:50:04 +03:00
committed by bugmaster
parent ad77956498
commit 75c262a97a
5 changed files with 52 additions and 12 deletions

View File

@@ -140,7 +140,8 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps)
myReadBuffer (0),
myDrawBuffer (0),
myDefaultVao (0),
myIsGlDebugCtx (Standard_False)
myIsGlDebugCtx (Standard_False),
myResolutionRatio (1.0f)
{
// system-dependent fields
#if defined(HAVE_EGL)
@@ -2607,7 +2608,7 @@ void OpenGl_Context::SetLineWidth (const Standard_ShortReal theWidth)
if (core11 != NULL)
{
// glLineWidth() is still defined within Core Profile, but has no effect with values != 1.0f
core11fwd->glLineWidth (theWidth);
core11fwd->glLineWidth (theWidth * myResolutionRatio);
}
#ifdef HAVE_GL2PS
if (IsFeedback())