1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0033056: Visualization - add front face culling option

Added Graphic3d_TypeOfBackfacingModel_FrontCulled enumeration value.
OpenGl_Context::SetFaceCulling() now supports GL_FRONT in addition to GL_BACK.

Added -faceCulling option to vaspects Draw command.
This commit is contained in:
kgv
2022-07-06 23:39:14 +03:00
committed by smoskvin
parent e1d576bf31
commit 9db675b3d6
11 changed files with 183 additions and 42 deletions

View File

@@ -493,7 +493,8 @@ void RWGltf_GltfMaterialMap::DefineMaterial (const XCAFPrs_Style& theStyle,
// as both may share the same material having "auto" flag
if (theStyle.Material().IsNull()
|| theStyle.Material()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_Auto
|| theStyle.Material()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_DoubleSided)
|| theStyle.Material()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_DoubleSided
|| theStyle.Material()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_FrontCulled) // front culling flag cannot be exported to glTF
{
myWriter->Key ("doubleSided");
myWriter->Bool (true);