From 237106537512dd67ab739a1fee8ea10e0b8da02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Garc=C3=ADa=20Li=C3=B1=C3=A1n?= Date: Tue, 31 Aug 2021 18:04:39 +0200 Subject: [PATCH] Canvas: Image depth refers to the amount of depth slices, not the bit depth --- simgear/canvas/Canvas.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/canvas/Canvas.cxx b/simgear/canvas/Canvas.cxx index c2ef349f..bc2bbe85 100644 --- a/simgear/canvas/Canvas.cxx +++ b/simgear/canvas/Canvas.cxx @@ -330,7 +330,7 @@ namespace canvas if (!_screenshotCallback) { // no draw callback yet osg::Image* shot = new osg::Image(); - shot->allocateImage(getSizeX(), getSizeY(), 24, GL_RGB, GL_UNSIGNED_BYTE); + shot->allocateImage(getSizeX(), getSizeY(), 1, GL_RGB, GL_UNSIGNED_BYTE); camera->attach(osg::Camera::COLOR_BUFFER, shot); camera->setFinalDrawCallback(new CanvasImageCallback(shot)); SG_LOG(SG_GENERAL,SG_INFO,"CanvasImage: attached image and draw callback to camera " << camera << " for canvas " << canvasname << ". Ready for subscriber now.");