mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025544: Visualization, TKOpenGl - support grayscale textures
Image_PixMap::ImgFormat - extend enumeration by ImgAlpha and ImgAlphaF. OpenGl_Workspace::setTextureParams() - specify GL_REPLACE for 1-component textures with disabled modulation. OpenGl_Texture::GetDataFormat() - return GL_LUMINANCE format for ImgGray format and GL_ALPHA for ImgAlpha. vmarkerstest - override pixel format for grayscale images to ImgAlpha. Add test case bugs/vis/bug25544_graytexture.
This commit is contained in:
@@ -5051,6 +5051,14 @@ static Standard_Integer VMarkersTest (Draw_Interpretor&,
|
||||
std::cerr << "Could not load image from file '" << aFileName << "'!\n";
|
||||
return 1;
|
||||
}
|
||||
if (anImage->Format() == Image_PixMap::ImgGray)
|
||||
{
|
||||
anImage->SetFormat (Image_PixMap::ImgAlpha);
|
||||
}
|
||||
else if (anImage->Format() == Image_PixMap::ImgGrayF)
|
||||
{
|
||||
anImage->SetFormat (Image_PixMap::ImgAlphaF);
|
||||
}
|
||||
anAspect = new Graphic3d_AspectMarker3d (anImage);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user