support transparent background when using renderToFramebuffer
This commit is contained in:
parent
3d95e9ac4b
commit
1f3c2ef2c8
|
@ -1284,7 +1284,7 @@ void View3DInventorViewer::renderToFramebuffer(QGLFramebufferObject* fbo)
|
||||||
|
|
||||||
const QColor col = this->backgroundColor();
|
const QColor col = this->backgroundColor();
|
||||||
glViewport(0, 0, width, height);
|
glViewport(0, 0, width, height);
|
||||||
glClearColor(col.redF(), col.greenF(), col.blueF(), 1.0f);
|
glClearColor(col.redF(), col.greenF(), col.blueF(), col.alphaF());
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
glDepthRange(0.1,1.0);
|
glDepthRange(0.1,1.0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user