Skip to content

Commit

Permalink
Merge pull request #29 from allen-cell-animated/fix/save-image-backgr…
Browse files Browse the repository at this point in the history
…ound-color

fix background color when Save Image happens
  • Loading branch information
toloudis authored Feb 26, 2022
2 parents ebb75ce + 7012260 commit be86349
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion agave_app/GLView3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,15 @@ GLView3D::captureQimage()

fbo->bind();
check_glfb("bind framebuffer for screen capture");
glClearColor(0.0, 0.0, 0.0, 1.0);
Scene* scene = m_renderer->scene();
if (scene) {
glClearColor(scene->m_material.m_backgroundColor[0],
scene->m_material.m_backgroundColor[1],
scene->m_material.m_backgroundColor[2],
1.0);
} else {
glClearColor(0.0, 0.0, 0.0, 1.0);
}
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

// do a render into the temp framebuffer
Expand Down

0 comments on commit be86349

Please sign in to comment.