summaryrefslogtreecommitdiffstats
path: root/src/render/renderstates/renderstateset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/renderstates/renderstateset.cpp')
-rw-r--r--src/render/renderstates/renderstateset.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/render/renderstates/renderstateset.cpp b/src/render/renderstates/renderstateset.cpp
index 1d2520177..608719daf 100644
--- a/src/render/renderstates/renderstateset.cpp
+++ b/src/render/renderstates/renderstateset.cpp
@@ -256,11 +256,18 @@ RenderState *RenderState::getOrCreateBackendState(QRenderState *renderState)
}
case QRenderState::BlendState: {
QBlendState *blendState = static_cast<QBlendState *>(renderState);
- return BlendState::getOrCreate(blendState->srcRGB(), blendState->dstRGB());
+ // just use the same values for RGB and Alpha
+ return BlendState::getOrCreate(blendState->srcRGB(), blendState->dstRGB(),
+ blendState->srcRGB(), blendState->dstRGB(),
+ blendState->enabled(),
+ blendState->bufferIndex());
}
case QRenderState::BlendStateSeparate: {
QBlendState *blendState = static_cast<QBlendState *>(renderState);
- return BlendStateSeparate::getOrCreate(blendState->srcRGB(), blendState->dstRGB(), blendState->srcAlpha(), blendState->dstAlpha());
+ return BlendState::getOrCreate(blendState->srcRGB(), blendState->dstRGB(),
+ blendState->srcAlpha(), blendState->dstAlpha(),
+ blendState->enabled(),
+ blendState->bufferIndex());
}
case QRenderState::CullFace: {
QCullFace *cullFace = static_cast<QCullFace *>(renderState);