Canvas: Image depth refers to the amount of depth slices, not the bit depth
This commit is contained in:
@@ -330,7 +330,7 @@ namespace canvas
|
|||||||
if (!_screenshotCallback) {
|
if (!_screenshotCallback) {
|
||||||
// no draw callback yet
|
// no draw callback yet
|
||||||
osg::Image* shot = new osg::Image();
|
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->attach(osg::Camera::COLOR_BUFFER, shot);
|
||||||
camera->setFinalDrawCallback(new CanvasImageCallback(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.");
|
SG_LOG(SG_GENERAL,SG_INFO,"CanvasImage: attached image and draw callback to camera " << camera << " for canvas " << canvasname << ". Ready for subscriber now.");
|
||||||
|
|||||||
Reference in New Issue
Block a user