summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gl/context.cpp')
-rw-r--r--src/mbgl/gl/context.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index 4afbe5af1e..22b22b549d 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -617,6 +617,9 @@ void Context::setDirtyState() {
clearDepth.setDirty();
clearColor.setDirty();
clearStencil.setDirty();
+ cullFace.setDirty();
+ cullFaceSide.setDirty();
+ frontFace.setDirty();
program.setDirty();
lineWidth.setDirty();
activeTextureUnit.setDirty();
@@ -663,6 +666,16 @@ void Context::clear(optional<mbgl::Color> color,
MBGL_CHECK_ERROR(glClear(mask));
}
+void Context::setCullFaceMode(const CullFaceMode& mode) {
+ cullFace = mode.cullFace;
+
+ // These shouldn't need to be updated when face culling is disabled, but we
+ // might end up having the same isssues with Adreno 2xx GPUs as noted in
+ // Context::setDepthMode.
+ cullFaceSide = mode.side;
+ frontFace = mode.frontFace;
+}
+
#if not MBGL_USE_GLES2
void Context::setDrawMode(const Points& points) {
pointSize = points.pointSize;