1
0
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:
kgv
2014-12-04 15:31:31 +03:00
committed by bugmaster
parent a319f03ff9
commit 076ca35c3f
13 changed files with 186 additions and 39 deletions

View File

@@ -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