diff options
-rw-r--r-- | src/threed/scene/qglrendersequencer.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/threed/scene/qglrendersequencer.cpp b/src/threed/scene/qglrendersequencer.cpp index a13c77f8e..521ace238 100644 --- a/src/threed/scene/qglrendersequencer.cpp +++ b/src/threed/scene/qglrendersequencer.cpp @@ -324,6 +324,25 @@ void QGLRenderSequencer::applyState() } } } + if (s.backMaterial() && !d->painter->isPicking()) + { + QGLMaterial *mat = s.backMaterial(); + if (1) //FIXME: d->painter->faceMaterial(QGL::FrontFaces) != mat) + { + d->painter->setFaceMaterial(QGL::BackFaces, mat); + int texUnit = 0; + for (int i = 0; i < mat->textureLayerCount(); ++i) + { + QGLTexture2D *tex = mat->texture(i); + if (tex) + { + d->painter->glActiveTexture(GL_TEXTURE0 + texUnit); + tex->bind(); + ++texUnit; + } + } + } + } } void QGLRenderSequencer::insertNew(const QGLRenderOrder &order) |