X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FOpenGl%2FOpenGl_FrameBuffer.cxx;h=a05e3216600c61fe4649d167a33f3b1372c024ba;hp=3380c17e1f049ff2965b6d3bff9023a3199c8ec5;hb=4eff0c0480add8629a63c89672131e29b74d1c6d;hpb=8f00325d73ba7521020db6e201786eaeab48cb75 diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index 3380c17e1f..a05e321660 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -779,11 +779,11 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t { #if !defined(GL_ES_VERSION_2_0) case Image_Format_Gray: - aFormat = GL_DEPTH_COMPONENT; + aFormat = theBufferType == Graphic3d_BT_Depth ? GL_DEPTH_COMPONENT : GL_RED; aType = GL_UNSIGNED_BYTE; break; case Image_Format_GrayF: - aFormat = GL_DEPTH_COMPONENT; + aFormat = theBufferType == Graphic3d_BT_Depth ? GL_DEPTH_COMPONENT : GL_RED; aType = GL_FLOAT; break; case Image_Format_RGF: