mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029528: Visualization, TKOpenGl - allow defining sRGB textures
OpenGL rendering is now done into sRGB framebuffer. OpenGl_ShaderManager::prepareStdProgramFboBlit() has been extended by programs resolving MSAA texture and applying gamma correction as fallbacks. Quantity_Color definition has been modified to store RGB components in linear color space within Quantity_TOC_RGB type. Standard colors defined by Quantity_NameOfColor enumeration has been updated accordingly. New Quantity_TOC_sRGB type has been introduced to handle RGB components in non-linear sRGB color space. OpenGl_TextureFormat class definition has been moved to dedicated files. New method OpenGl_TextureFormat::FindFormat() replaces OpenGl_Texture::GetDataFormat(). New method OpenGl_TextureFormat::FindSizedFormat() replaces OpenGl_FrameBuffer::getColorDataFormat() and OpenGl_FrameBuffer::getDepthDataFormat(). Graphic3d_TextureRoot::IsColorMap() - introduced new property defining if RGB(A)8 image formats should be loaded as sRGB(A) textures or as data RGB(A) textures. OpenGl_Texture initialization methods have been extended with new theIsColorMap argument. vreadpixel - added argument -sRGB printing color in sRGB color space. Test cases have been updated to new sRGB rendered results.
This commit is contained in:
@@ -1098,7 +1098,7 @@ static void MakeSTEPStyles (STEPConstruct_Styles &Styles,
|
||||
}
|
||||
else {
|
||||
// default white color
|
||||
surfColor = Styles.EncodeColor(Quantity_Color(1,1,1,Quantity_TOC_RGB),DPDCs,ColRGBs);
|
||||
surfColor = Styles.EncodeColor(Quantity_Color(Quantity_NOC_WHITE),DPDCs,ColRGBs);
|
||||
PSA = Styles.MakeColorPSA ( item, surfColor, curvColor, isComponent );
|
||||
if ( isComponent )
|
||||
setDefaultInstanceColor( override, PSA);
|
||||
@@ -1857,7 +1857,7 @@ static Standard_Boolean createSHUOStyledItem (const XCAFPrs_Style& style,
|
||||
// set default color for invisible SHUO.
|
||||
Standard_Boolean isSetDefaultColor = Standard_False;
|
||||
if (surfColor.IsNull() && curvColor.IsNull() && !style.IsVisible() ) {
|
||||
surfColor = Styles.EncodeColor ( Quantity_Color( 1, 1, 1, Quantity_TOC_RGB ) );
|
||||
surfColor = Styles.EncodeColor ( Quantity_Color(Quantity_NOC_WHITE) );
|
||||
isSetDefaultColor = Standard_True;
|
||||
}
|
||||
Handle(StepVisual_PresentationStyleAssignment) PSA =
|
||||
|
Reference in New Issue
Block a user