1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/vis/bug27700
apl 6d0e6be5a2 0027700: Visualization - glPolygonMode() used for frame drawing affects label text shading
Patch extends GL-state caching mechanism of OpenGl_Context by new methods.
The methods allow setting/inquiring polygon rasterization and hatching modes:
- OpenGl_Context::SetPolygonMode
- OpenGl_Context::SetPolygonHatchEnabled
- OpenGl_Context::SetPolygonHatchStyle

With these methods OpenGl_Text is able to configure shading as necessary.
And this configuration is done irrespectively of currently defined face aspect.
Code of OpenGl_Workspace is also modified to use these methods as well.

Porting notes:
- OpenGl_LineAttributes now require OpenGl_Context instance for calling GL API.
- OpenGl_LineAttributes has new flag IsEnabled, it turns on/off hatching without changing the hatch type.
  By default this flag is turned on and can be never modified for compatibility with old code.
- OpenGl_LineAttributes is not anymore a field of OpenGl_Workspace::myLineAttrib.
  This resource is directly created by an OpenGl_Context instance on demand.
  If you use custom implementation of hatch patterns please create and share custom resource
  under resource-key "OpenGl_LineAttributes" in corresponding OpenGl_Context before using
  methods SetPolygonHatchEnabled, SetPolygonHatchStyle.
2016-08-04 11:56:59 +03:00

17 lines
403 B
Plaintext

puts "========"
puts "CR27700"
puts "========"
puts ""
############################################################################################
puts "Visualization - glPolygonMode() used for frame drawing affects label text shading"
############################################################################################
vclear
vinit View1
OCC27700
vtop
vfit
vdump $imagedir/${casename}.png