1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0028095: Draw Harness, ViewerTest - use RGBA format instead of BGRA within vreadpixel

OpenGl_Workspace::BufferDump() now implicitly converts RGBA dump
into requested BGR, BGRA and RGB image.

DRAW command dversion is improved to report OpenGL variant used (desktop or ES); reporting of version of MSVC is corrected for VC14 and above; reporting of HAVE_OPENCL option is removed.

Usage of command vdump is corrected in some tests to specify extension .png for an image file.

Compiler warning is eliminated in OpenGl_Text.cxx (OpenGL ES mode only).
This commit is contained in:
kgv
2016-11-17 15:39:52 +03:00
committed by apn
parent 564c82b4f2
commit f9f740d6b0
14 changed files with 241 additions and 99 deletions

View File

@@ -2826,12 +2826,11 @@ Standard_Boolean V3d_View::ToPixMap (Image_PixMap& theImage,
|| theImage.SizeX() != Standard_Size(aTargetSize.x())
|| theImage.SizeY() != Standard_Size(aTargetSize.y()))
{
const bool isBigEndian = Image_PixMap::IsBigEndianHost();
Image_PixMap::ImgFormat aFormat = Image_PixMap::ImgUNKNOWN;
switch (theParams.BufferType)
{
case Graphic3d_BT_RGB: aFormat = isBigEndian ? Image_PixMap::ImgRGB : Image_PixMap::ImgBGR; break;
case Graphic3d_BT_RGBA: aFormat = isBigEndian ? Image_PixMap::ImgRGBA : Image_PixMap::ImgBGRA; break;
case Graphic3d_BT_RGB: aFormat = Image_PixMap::ImgRGB; break;
case Graphic3d_BT_RGBA: aFormat = Image_PixMap::ImgRGBA; break;
case Graphic3d_BT_Depth: aFormat = Image_PixMap::ImgGrayF; break;
}