mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0031597: Visualization, TKOpenGl - allow disabling Alpha component writes within OpenGl_Context::ColorMask()
Added OpenGl_Caps::buffersOpaqueAlpha option allowing to disable writes into alpha component of color buffer and keep it opaque. Added OpenGl_Context::SetColorMaskRGBA() method overriding each color component deliberately. New option is set within WebGL sample.
This commit is contained in:
@@ -227,6 +227,7 @@ bool WasmOcctView::initViewer()
|
||||
Handle(Aspect_DisplayConnection) aDisp;
|
||||
Handle(OpenGl_GraphicDriver) aDriver = new OpenGl_GraphicDriver (aDisp, false);
|
||||
aDriver->ChangeOptions().buffersNoSwap = true; // swap has no effect in WebGL
|
||||
aDriver->ChangeOptions().buffersOpaqueAlpha = true; // avoid unexpected blending of canvas with page background
|
||||
if (!aDriver->InitContext())
|
||||
{
|
||||
Message::DefaultMessenger()->Send (TCollection_AsciiString ("Error: EGL initialization failed"), Message_Fail);
|
||||
|
Reference in New Issue
Block a user