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

0026122: Visualization, TKOpenGl - clipping and capping is broken when ffp is disabled on Linux

OpenGl_Clipping - do not setup clipping planes using FFP when it is disabled.

OpenGl_ShaderManager - apply 2d texture coordinates transformation in GLSL programs.
OpenGl_Context::SetTextureMatrix() - move texture matrix assignment from OpenGl_Workspace::setTextureParams() to OpenGl_Context.

Add test case demo/samples/dimensionsglsl with FFP turned OFF.
Add test case v3d/glsl/texture_trsf applying texture transformation.

Small correction of test case for issue CR26122
This commit is contained in:
kgv
2015-10-16 08:50:46 +03:00
committed by bugmaster
parent 3a398392b4
commit 79f4f03618
18 changed files with 245 additions and 104 deletions

View File

@@ -176,11 +176,10 @@ void OpenGl_CappingPlaneResource::UpdateTransform()
Standard_ShortReal F[3] = { 0.0f, 0.0f, 0.0f };
// project plane normal onto OX to find left vector
Standard_ShortReal aConfusion = (Standard_ShortReal)Precision::Confusion();
Standard_ShortReal aProjLen =
sqrt ( (Standard_ShortReal)(anEquation[0] * anEquation[0])
+ (Standard_ShortReal)(anEquation[2] * anEquation[2]));
if (aProjLen < aConfusion)
if (aProjLen < ShortRealSmall())
{
L[0] = 1.0f;
}