File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,3 +318,13 @@ void Display3d::SetBuffersNoSwap(Standard_Boolean theNoSwap)
318318 // their own buffer swapping.
319319 GetGraphicDriver ()->ChangeOptions ().buffersNoSwap = theNoSwap;
320320}
321+
322+ void Display3d::SetSRGBDisabled (Standard_Boolean theDisabled)
323+ {
324+ // Disable sRGB rendering (OFF by default in OCCT).
325+ // When enabled, OCCT won't attempt to create sRGB framebuffers.
326+ // Useful for macOS where GL_SRGB8_ALPHA8 format may not be supported
327+ // in certain contexts.
328+ // Must be called BEFORE Init()/InitOffscreen() to take effect.
329+ GetGraphicDriver ()->ChangeOptions ().sRGBDisable = theDisabled;
330+ }
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ class Display3d
7474 Standard_EXPORT void SetContextCompatible (Standard_Boolean theCompatible);
7575 Standard_EXPORT void SetFfpEnable (Standard_Boolean theEnabled);
7676 Standard_EXPORT void SetBuffersNoSwap (Standard_Boolean theNoSwap);
77+ Standard_EXPORT void SetSRGBDisabled (Standard_Boolean theDisabled);
7778
7879 Standard_EXPORT Handle_V3d_View& GetView () {return myV3dView;};
7980 Standard_EXPORT Handle_V3d_Viewer& GetViewer () {return myV3dViewer;};
Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ class Display3d {
8989 void SetFfpEnable (bool theEnabled);
9090 %feature(" autodoc" , " 1" );
9191 void SetBuffersNoSwap (bool theNoSwap);
92+ %feature(" autodoc" , " 1" );
93+ void SetSRGBDisabled (bool theDisabled);
9294};
9395
9496%extend Display3d {
You can’t perform that action at this time.
0 commit comments