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.