summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core-files.json3
-rw-r--r--src/mbgl/gfx/cull_face_mode.hpp24
-rw-r--r--src/mbgl/gfx/types.hpp11
-rw-r--r--src/mbgl/gl/context.cpp8
-rw-r--r--src/mbgl/gl/context.hpp4
-rw-r--r--src/mbgl/gl/cull_face_mode.cpp16
-rw-r--r--src/mbgl/gl/cull_face_mode.hpp40
-rw-r--r--src/mbgl/gl/enum.cpp38
-rw-r--r--src/mbgl/gl/program.hpp2
-rw-r--r--src/mbgl/gl/value.cpp24
-rw-r--r--src/mbgl/gl/value.hpp16
-rw-r--r--src/mbgl/programs/collision_box_program.hpp4
-rw-r--r--src/mbgl/programs/program.hpp2
-rw-r--r--src/mbgl/programs/symbol_program.hpp2
-rw-r--r--src/mbgl/renderer/layers/render_background_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_circle_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_custom_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp4
-rw-r--r--src/mbgl/renderer/layers/render_fill_layer.cpp4
-rw-r--r--src/mbgl/renderer/layers/render_heatmap_layer.cpp4
-rw-r--r--src/mbgl/renderer/layers/render_hillshade_layer.cpp4
-rw-r--r--src/mbgl/renderer/layers/render_line_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_raster_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_symbol_layer.cpp6
-rw-r--r--src/mbgl/renderer/render_tile.cpp6
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp2
-rw-r--r--src/mbgl/renderer/sources/render_image_source.cpp2
27 files changed, 126 insertions, 110 deletions
diff --git a/src/core-files.json b/src/core-files.json
index 60fce99c5d..42a30a3ea8 100644
--- a/src/core-files.json
+++ b/src/core-files.json
@@ -18,7 +18,6 @@
"src/mbgl/geometry/line_atlas.cpp",
"src/mbgl/gl/attribute.cpp",
"src/mbgl/gl/context.cpp",
- "src/mbgl/gl/cull_face_mode.cpp",
"src/mbgl/gl/debugging.cpp",
"src/mbgl/gl/debugging_extension.cpp",
"src/mbgl/gl/enum.cpp",
@@ -498,6 +497,7 @@
"mbgl/geometry/line_atlas.hpp": "src/mbgl/geometry/line_atlas.hpp",
"mbgl/gfx/attribute.hpp": "src/mbgl/gfx/attribute.hpp",
"mbgl/gfx/color_mode.hpp": "src/mbgl/gfx/color_mode.hpp",
+ "mbgl/gfx/cull_face_mode.hpp": "src/mbgl/gfx/cull_face_mode.hpp",
"mbgl/gfx/depth_mode.hpp": "src/mbgl/gfx/depth_mode.hpp",
"mbgl/gfx/draw_mode.hpp": "src/mbgl/gfx/draw_mode.hpp",
"mbgl/gfx/primitives.hpp": "src/mbgl/gfx/primitives.hpp",
@@ -506,7 +506,6 @@
"mbgl/gfx/uniform.hpp": "src/mbgl/gfx/uniform.hpp",
"mbgl/gl/attribute.hpp": "src/mbgl/gl/attribute.hpp",
"mbgl/gl/context.hpp": "src/mbgl/gl/context.hpp",
- "mbgl/gl/cull_face_mode.hpp": "src/mbgl/gl/cull_face_mode.hpp",
"mbgl/gl/debugging.hpp": "src/mbgl/gl/debugging.hpp",
"mbgl/gl/debugging_extension.hpp": "src/mbgl/gl/debugging_extension.hpp",
"mbgl/gl/defines.hpp": "src/mbgl/gl/defines.hpp",
diff --git a/src/mbgl/gfx/cull_face_mode.hpp b/src/mbgl/gfx/cull_face_mode.hpp
new file mode 100644
index 0000000000..42920ee02a
--- /dev/null
+++ b/src/mbgl/gfx/cull_face_mode.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <mbgl/gfx/types.hpp>
+
+namespace mbgl {
+namespace gfx {
+
+class CullFaceMode {
+public:
+ bool enabled;
+ CullFaceSideType side;
+ CullFaceWindingType winding;
+
+ static CullFaceMode disabled() {
+ return { false, CullFaceSideType::Back, CullFaceWindingType::CounterClockwise };
+ }
+
+ static CullFaceMode backCCW() {
+ return { true, CullFaceSideType::Back, CullFaceWindingType::CounterClockwise };
+ }
+};
+
+} // namespace gfx
+} // namespace mbgl
diff --git a/src/mbgl/gfx/types.hpp b/src/mbgl/gfx/types.hpp
index 8faa9dc7f9..d1421dddb7 100644
--- a/src/mbgl/gfx/types.hpp
+++ b/src/mbgl/gfx/types.hpp
@@ -77,5 +77,16 @@ enum class StencilOpType : uint8_t {
DecrementWrap,
};
+enum CullFaceSideType : uint8_t {
+ Front,
+ Back,
+ FrontAndBack,
+};
+
+enum CullFaceWindingType : uint8_t {
+ Clockwise,
+ CounterClockwise,
+};
+
} // namespace gfx
} // namespace mbgl
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index abe082f14f..bcbb3ab66c 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -618,7 +618,7 @@ void Context::setDirtyState() {
clearStencil.setDirty();
cullFace.setDirty();
cullFaceSide.setDirty();
- frontFace.setDirty();
+ cullFaceWinding.setDirty();
program.setDirty();
lineWidth.setDirty();
activeTextureUnit.setDirty();
@@ -665,14 +665,14 @@ void Context::clear(optional<mbgl::Color> color,
MBGL_CHECK_ERROR(glClear(mask));
}
-void Context::setCullFaceMode(const CullFaceMode& mode) {
- cullFace = mode.cullFace;
+void Context::setCullFaceMode(const gfx::CullFaceMode& mode) {
+ cullFace = mode.enabled;
// 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;
+ cullFaceWinding = mode.winding;
}
#if not MBGL_USE_GLES2
diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp
index d5e51d0adf..7bc139da36 100644
--- a/src/mbgl/gl/context.hpp
+++ b/src/mbgl/gl/context.hpp
@@ -173,7 +173,7 @@ public:
void setDepthMode(const gfx::DepthMode&);
void setStencilMode(const gfx::StencilMode&);
void setColorMode(const gfx::ColorMode&);
- void setCullFaceMode(const CullFaceMode&);
+ void setCullFaceMode(const gfx::CullFaceMode&);
void draw(gfx::PrimitiveType,
std::size_t indexOffset,
@@ -267,7 +267,7 @@ private:
State<value::BindRenderbuffer> bindRenderbuffer;
State<value::CullFace> cullFace;
State<value::CullFaceSide> cullFaceSide;
- State<value::FrontFace> frontFace;
+ State<value::CullFaceWinding> cullFaceWinding;
#if not MBGL_USE_GLES2
State<value::PointSize> pointSize;
#endif // MBGL_USE_GLES2
diff --git a/src/mbgl/gl/cull_face_mode.cpp b/src/mbgl/gl/cull_face_mode.cpp
deleted file mode 100644
index 53dd340204..0000000000
--- a/src/mbgl/gl/cull_face_mode.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <mbgl/gl/cull_face_mode.hpp>
-#include <mbgl/gl/defines.hpp>
-#include <mbgl/util/traits.hpp>
-
-namespace mbgl {
-namespace gl {
-
-static_assert(underlying_type(CullFaceMode::Front) == GL_FRONT, "OpenGL enum mismatch");
-static_assert(underlying_type(CullFaceMode::Back) == GL_BACK, "OpenGL enum mismatch");
-static_assert(underlying_type(CullFaceMode::FrontAndBack) == GL_FRONT_AND_BACK, "OpenGL enum mismatch");
-
-static_assert(underlying_type(CullFaceMode::Clockwise) == GL_CW, "OpenGL enum mismatch");
-static_assert(underlying_type(CullFaceMode::CounterClockwise) == GL_CCW, "OpenGL enum mismatch");
-
-} // namespace gl
-} // namespace mbgl
diff --git a/src/mbgl/gl/cull_face_mode.hpp b/src/mbgl/gl/cull_face_mode.hpp
deleted file mode 100644
index a408d7a88c..0000000000
--- a/src/mbgl/gl/cull_face_mode.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#pragma once
-
-#include <cstdint>
-
-namespace mbgl {
-namespace gl {
-
-class CullFaceMode {
-public:
- enum CullFace : bool {
- Disable = false,
- Enable = true,
- };
-
- enum CullFaceSide : uint32_t {
- Front = 0x0404,
- Back = 0x0405,
- FrontAndBack = 0x0408,
- };
-
- enum FrontFace : uint32_t {
- Clockwise = 0x0900,
- CounterClockwise = 0x0901
- };
-
- CullFace cullFace;
- CullFaceSide side;
- FrontFace frontFace;
-
- static CullFaceMode disabled() {
- return CullFaceMode { Disable, CullFaceSide::Back, FrontFace::CounterClockwise };
- }
-
- static CullFaceMode backCCW() {
- return CullFaceMode { Enable, CullFaceSide::Back, FrontFace::CounterClockwise };
- }
-};
-
-} // namespace gl
-} // namespace mbgl
diff --git a/src/mbgl/gl/enum.cpp b/src/mbgl/gl/enum.cpp
index ea47f2104f..da536692d1 100644
--- a/src/mbgl/gl/enum.cpp
+++ b/src/mbgl/gl/enum.cpp
@@ -183,5 +183,43 @@ platform::GLenum Enum<gfx::StencilOpType>::to(const gfx::StencilOpType value) {
return GL_INVALID_ENUM;
}
+template <>
+gfx::CullFaceSideType Enum<gfx::CullFaceSideType>::from(const platform::GLint value) {
+ switch (value) {
+ case GL_FRONT: return gfx::CullFaceSideType::Front;
+ case GL_BACK: return gfx::CullFaceSideType::Back;
+ case GL_FRONT_AND_BACK: return gfx::CullFaceSideType::FrontAndBack;
+ }
+ return {};
+}
+
+template <>
+platform::GLenum Enum<gfx::CullFaceSideType>::to(const gfx::CullFaceSideType value) {
+ switch (value) {
+ case gfx::CullFaceSideType::Front: return GL_FRONT;
+ case gfx::CullFaceSideType::Back: return GL_BACK;
+ case gfx::CullFaceSideType::FrontAndBack: return GL_FRONT_AND_BACK;
+ }
+ return GL_INVALID_ENUM;
+}
+
+template <>
+gfx::CullFaceWindingType Enum<gfx::CullFaceWindingType>::from(const platform::GLint value) {
+ switch (value) {
+ case GL_CW: return gfx::CullFaceWindingType::Clockwise;
+ case GL_CCW: return gfx::CullFaceWindingType::CounterClockwise;
+ }
+ return {};
+}
+
+template <>
+platform::GLenum Enum<gfx::CullFaceWindingType>::to(const gfx::CullFaceWindingType value) {
+ switch (value) {
+ case gfx::CullFaceWindingType::Clockwise: return GL_CW;
+ case gfx::CullFaceWindingType::CounterClockwise: return GL_CCW;
+ }
+ return GL_INVALID_ENUM;
+}
+
} // namespace gl
} // namespace mbgl
diff --git a/src/mbgl/gl/program.hpp b/src/mbgl/gl/program.hpp
index 5bc7c2075b..7e98a63b8d 100644
--- a/src/mbgl/gl/program.hpp
+++ b/src/mbgl/gl/program.hpp
@@ -118,7 +118,7 @@ public:
gfx::DepthMode depthMode,
gfx::StencilMode stencilMode,
gfx::ColorMode colorMode,
- CullFaceMode cullFaceMode,
+ gfx::CullFaceMode cullFaceMode,
const UniformValues& uniformValues,
VertexArray& vertexArray,
const AttributeBindings& attributeBindings,
diff --git a/src/mbgl/gl/value.cpp b/src/mbgl/gl/value.cpp
index 8b46c1ae35..4e56686103 100644
--- a/src/mbgl/gl/value.cpp
+++ b/src/mbgl/gl/value.cpp
@@ -85,7 +85,7 @@ ColorMask::Type ColorMask::Get() {
const constexpr StencilFunc::Type StencilFunc::Default;
void StencilFunc::Set(const Type& value) {
- MBGL_CHECK_ERROR(glStencilFunc(static_cast<GLenum>(value.func), value.ref, value.mask));
+ MBGL_CHECK_ERROR(glStencilFunc(Enum<gfx::StencilFunctionType>::to(value.func), value.ref, value.mask));
}
StencilFunc::Type StencilFunc::Get() {
@@ -153,13 +153,13 @@ DepthTest::Type DepthTest::Get() {
const constexpr DepthFunc::Type DepthFunc::Default;
void DepthFunc::Set(const DepthFunc::Type& value) {
- MBGL_CHECK_ERROR(glDepthFunc(static_cast<GLenum>(value)));
+ MBGL_CHECK_ERROR(glDepthFunc(Enum<gfx::DepthFunctionType>::to(value)));
}
DepthFunc::Type DepthFunc::Get() {
GLint depthFunc;
MBGL_CHECK_ERROR(glGetIntegerv(GL_DEPTH_FUNC, &depthFunc));
- return static_cast<Type>(depthFunc);
+ return Enum<gfx::DepthFunctionType>::from(depthFunc);
}
const constexpr Blend::Type Blend::Default;
@@ -301,37 +301,37 @@ BindRenderbuffer::Type BindRenderbuffer::Get() {
const constexpr CullFace::Type CullFace::Default;
void CullFace::Set(const Type& value) {
- MBGL_CHECK_ERROR(value == CullFaceMode::Enable ? glEnable(GL_CULL_FACE) : glDisable(GL_CULL_FACE));
+ MBGL_CHECK_ERROR(value ? glEnable(GL_CULL_FACE) : glDisable(GL_CULL_FACE));
}
CullFace::Type CullFace::Get() {
GLboolean cullFace;
MBGL_CHECK_ERROR(cullFace = glIsEnabled(GL_CULL_FACE));
- return cullFace ? CullFaceMode::Enable : CullFaceMode::Disable;
+ return cullFace;
}
const constexpr CullFaceSide::Type CullFaceSide::Default;
void CullFaceSide::Set(const Type& value) {
- MBGL_CHECK_ERROR(glCullFace(static_cast<GLenum>(value)));
+ MBGL_CHECK_ERROR(glCullFace(Enum<gfx::CullFaceSideType>::to(value)));
}
CullFaceSide::Type CullFaceSide::Get() {
GLint cullFaceMode;
MBGL_CHECK_ERROR(glGetIntegerv(GL_CULL_FACE_MODE, &cullFaceMode));
- return static_cast<Type>(cullFaceMode);
+ return Enum<gfx::CullFaceSideType>::from(cullFaceMode);
}
-const constexpr FrontFace::Type FrontFace::Default;
+const constexpr CullFaceWinding::Type CullFaceWinding::Default;
-void FrontFace::Set(const Type& value) {
- MBGL_CHECK_ERROR(glFrontFace(static_cast<GLenum>(value)));
+void CullFaceWinding::Set(const Type& value) {
+ MBGL_CHECK_ERROR(glFrontFace(Enum<gfx::CullFaceWindingType>::to(value)));
}
-FrontFace::Type FrontFace::Get() {
+CullFaceWinding::Type CullFaceWinding::Get() {
GLint frontFace;
MBGL_CHECK_ERROR(glGetIntegerv(GL_FRONT_FACE, &frontFace));
- return static_cast<Type>(frontFace);
+ return Enum<gfx::CullFaceWindingType>::from(frontFace);
}
const constexpr BindTexture::Type BindTexture::Default;
diff --git a/src/mbgl/gl/value.hpp b/src/mbgl/gl/value.hpp
index 128eff2dce..9c01039b99 100644
--- a/src/mbgl/gl/value.hpp
+++ b/src/mbgl/gl/value.hpp
@@ -4,7 +4,7 @@
#include <mbgl/gfx/depth_mode.hpp>
#include <mbgl/gfx/stencil_mode.hpp>
#include <mbgl/gfx/color_mode.hpp>
-#include <mbgl/gl/cull_face_mode.hpp>
+#include <mbgl/gfx/cull_face_mode.hpp>
#include <mbgl/gl/attribute.hpp>
#include <mbgl/platform/gl_functions.hpp>
#include <mbgl/util/color.hpp>
@@ -215,22 +215,22 @@ struct BindRenderbuffer {
};
struct CullFace {
- using Type = CullFaceMode::CullFace;
- static const constexpr Type Default = CullFaceMode::Disable;
+ using Type = bool;
+ static const constexpr Type Default = false;
static void Set(const Type&);
static Type Get();
};
struct CullFaceSide {
- using Type = CullFaceMode::CullFaceSide;
- static const constexpr Type Default = CullFaceMode::Back;
+ using Type = gfx::CullFaceSideType;
+ static const constexpr Type Default = gfx::CullFaceSideType::Back;
static void Set(const Type&);
static Type Get();
};
-struct FrontFace {
- using Type = CullFaceMode::FrontFace;
- static const constexpr Type Default = CullFaceMode::CounterClockwise;
+struct CullFaceWinding {
+ using Type = gfx::CullFaceWindingType;
+ static const constexpr Type Default = gfx::CullFaceWindingType::CounterClockwise;
static void Set(const Type&);
static Type Get();
};
diff --git a/src/mbgl/programs/collision_box_program.hpp b/src/mbgl/programs/collision_box_program.hpp
index 43c2c7502d..08a1645910 100644
--- a/src/mbgl/programs/collision_box_program.hpp
+++ b/src/mbgl/programs/collision_box_program.hpp
@@ -61,7 +61,7 @@ public:
gfx::DepthMode depthMode,
gfx::StencilMode stencilMode,
gfx::ColorMode colorMode,
- gl::CullFaceMode cullFaceMode,
+ gfx::CullFaceMode cullFaceMode,
const UniformValues& uniformValues,
const gl::VertexBuffer<gfx::Vertex<CollisionBoxLayoutAttributes>>& layoutVertexBuffer,
const gl::VertexBuffer<gfx::Vertex<CollisionBoxDynamicAttributes>>& dynamicVertexBuffer,
@@ -142,7 +142,7 @@ public:
gfx::DepthMode depthMode,
gfx::StencilMode stencilMode,
gfx::ColorMode colorMode,
- gl::CullFaceMode cullFaceMode,
+ gfx::CullFaceMode cullFaceMode,
const UniformValues& uniformValues,
const gl::VertexBuffer<gfx::Vertex<CollisionBoxLayoutAttributes>>& layoutVertexBuffer,
const gl::VertexBuffer<gfx::Vertex<CollisionBoxDynamicAttributes>>& dynamicVertexBuffer,
diff --git a/src/mbgl/programs/program.hpp b/src/mbgl/programs/program.hpp
index 17b0af32b1..b683944607 100644
--- a/src/mbgl/programs/program.hpp
+++ b/src/mbgl/programs/program.hpp
@@ -74,7 +74,7 @@ public:
gfx::DepthMode depthMode,
gfx::StencilMode stencilMode,
gfx::ColorMode colorMode,
- gl::CullFaceMode cullFaceMode,
+ gfx::CullFaceMode cullFaceMode,
const gl::IndexBuffer<DrawMode>& indexBuffer,
const SegmentVector<Attributes>& segments,
const typename AllUniforms::Values& allUniformValues,
diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp
index 8a866c0eca..02af9df150 100644
--- a/src/mbgl/programs/symbol_program.hpp
+++ b/src/mbgl/programs/symbol_program.hpp
@@ -309,7 +309,7 @@ public:
gfx::DepthMode depthMode,
gfx::StencilMode stencilMode,
gfx::ColorMode colorMode,
- gl::CullFaceMode cullFaceMode,
+ gfx::CullFaceMode cullFaceMode,
const gl::IndexBuffer<DrawMode>& indexBuffer,
const SegmentVector<Attributes>& segments,
const typename AllUniforms::Values& allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_background_layer.cpp b/src/mbgl/renderer/layers/render_background_layer.cpp
index ce1494f5af..7494e01446 100644
--- a/src/mbgl/renderer/layers/render_background_layer.cpp
+++ b/src/mbgl/renderer/layers/render_background_layer.cpp
@@ -71,7 +71,7 @@ void RenderBackgroundLayer::render(PaintParameters& parameters, RenderSource*) {
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
parameters.staticData.quadTriangleIndexBuffer,
parameters.staticData.tileTriangleSegments,
allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_circle_layer.cpp b/src/mbgl/renderer/layers/render_circle_layer.cpp
index 0a5950637c..10f38a3413 100644
--- a/src/mbgl/renderer/layers/render_circle_layer.cpp
+++ b/src/mbgl/renderer/layers/render_circle_layer.cpp
@@ -102,7 +102,7 @@ void RenderCircleLayer::render(PaintParameters& parameters, RenderSource*) {
? parameters.stencilModeForClipping(tile.clip)
: gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
*bucket.indexBuffer,
bucket.segments,
allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_custom_layer.cpp b/src/mbgl/renderer/layers/render_custom_layer.cpp
index bff4640549..5eef5d2cb1 100644
--- a/src/mbgl/renderer/layers/render_custom_layer.cpp
+++ b/src/mbgl/renderer/layers/render_custom_layer.cpp
@@ -65,7 +65,7 @@ void RenderCustomLayer::render(PaintParameters& paintParameters, RenderSource*)
glContext.setDepthMode(paintParameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly));
glContext.setStencilMode(gfx::StencilMode::disabled());
glContext.setColorMode(paintParameters.colorModeForRenderPass());
- glContext.setCullFaceMode(gl::CullFaceMode::disabled());
+ glContext.setCullFaceMode(gfx::CullFaceMode::disabled());
CustomLayerRenderParameters parameters;
diff --git a/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp b/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp
index 78ad20d8d1..2753fcd533 100644
--- a/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp
+++ b/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp
@@ -96,7 +96,7 @@ void RenderFillExtrusionLayer::render(PaintParameters& parameters, RenderSource*
parameters.depthModeFor3D(gfx::DepthMaskType::ReadWrite),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::backCCW(),
+ gfx::CullFaceMode::backCCW(),
*tileBucket.indexBuffer,
tileBucket.triangleSegments,
allUniformValues,
@@ -197,7 +197,7 @@ void RenderFillExtrusionLayer::render(PaintParameters& parameters, RenderSource*
gfx::DepthMode::disabled(),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
parameters.staticData.quadTriangleIndexBuffer,
parameters.staticData.extrusionTextureSegments,
allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_fill_layer.cpp b/src/mbgl/renderer/layers/render_fill_layer.cpp
index d529831997..226c8a11b7 100644
--- a/src/mbgl/renderer/layers/render_fill_layer.cpp
+++ b/src/mbgl/renderer/layers/render_fill_layer.cpp
@@ -105,7 +105,7 @@ void RenderFillLayer::render(PaintParameters& parameters, RenderSource*) {
depthMode,
parameters.stencilModeForClipping(tile.clip),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
indexBuffer,
segments,
allUniformValues,
@@ -195,7 +195,7 @@ void RenderFillLayer::render(PaintParameters& parameters, RenderSource*) {
depthMode,
parameters.stencilModeForClipping(tile.clip),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
indexBuffer,
segments,
allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_heatmap_layer.cpp b/src/mbgl/renderer/layers/render_heatmap_layer.cpp
index 9a18b35f7f..a3a9a67de5 100644
--- a/src/mbgl/renderer/layers/render_heatmap_layer.cpp
+++ b/src/mbgl/renderer/layers/render_heatmap_layer.cpp
@@ -123,7 +123,7 @@ void RenderHeatmapLayer::render(PaintParameters& parameters, RenderSource*) {
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
stencilMode,
gfx::ColorMode::additive(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
*bucket.indexBuffer,
bucket.segments,
allUniformValues,
@@ -171,7 +171,7 @@ void RenderHeatmapLayer::render(PaintParameters& parameters, RenderSource*) {
gfx::DepthMode::disabled(),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
parameters.staticData.quadTriangleIndexBuffer,
parameters.staticData.extrusionTextureSegments,
allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_hillshade_layer.cpp b/src/mbgl/renderer/layers/render_hillshade_layer.cpp
index f492464b4d..c18e09512d 100644
--- a/src/mbgl/renderer/layers/render_hillshade_layer.cpp
+++ b/src/mbgl/renderer/layers/render_hillshade_layer.cpp
@@ -100,7 +100,7 @@ void RenderHillshadeLayer::render(PaintParameters& parameters, RenderSource* src
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
indexBuffer,
segments,
allUniformValues,
@@ -161,7 +161,7 @@ void RenderHillshadeLayer::render(PaintParameters& parameters, RenderSource* src
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
parameters.staticData.quadTriangleIndexBuffer,
parameters.staticData.rasterSegments,
allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_line_layer.cpp b/src/mbgl/renderer/layers/render_line_layer.cpp
index 8b303890eb..5b36cd4158 100644
--- a/src/mbgl/renderer/layers/render_line_layer.cpp
+++ b/src/mbgl/renderer/layers/render_line_layer.cpp
@@ -91,7 +91,7 @@ void RenderLineLayer::render(PaintParameters& parameters, RenderSource*) {
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
parameters.stencilModeForClipping(tile.clip),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
*bucket.indexBuffer,
bucket.segments,
allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_raster_layer.cpp b/src/mbgl/renderer/layers/render_raster_layer.cpp
index 86dd0ca61b..1912c84fc7 100644
--- a/src/mbgl/renderer/layers/render_raster_layer.cpp
+++ b/src/mbgl/renderer/layers/render_raster_layer.cpp
@@ -114,7 +114,7 @@ void RenderRasterLayer::render(PaintParameters& parameters, RenderSource* source
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
indexBuffer,
segments,
allUniformValues,
diff --git a/src/mbgl/renderer/layers/render_symbol_layer.cpp b/src/mbgl/renderer/layers/render_symbol_layer.cpp
index f87482fed4..44d0c0001e 100644
--- a/src/mbgl/renderer/layers/render_symbol_layer.cpp
+++ b/src/mbgl/renderer/layers/render_symbol_layer.cpp
@@ -122,7 +122,7 @@ void RenderSymbolLayer::render(PaintParameters& parameters, RenderSource*) {
: gfx::DepthMode::disabled(),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
*buffers.indexBuffer,
buffers.segments,
allUniformValues,
@@ -255,7 +255,7 @@ void RenderSymbolLayer::render(PaintParameters& parameters, RenderSource*) {
gfx::DepthMode::disabled(),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
CollisionBoxProgram::UniformValues {
uniforms::u_matrix::Value( tile.matrix ),
uniforms::u_extrude_scale::Value( extrudeScale ),
@@ -290,7 +290,7 @@ void RenderSymbolLayer::render(PaintParameters& parameters, RenderSource*) {
gfx::DepthMode::disabled(),
gfx::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
CollisionCircleProgram::UniformValues {
uniforms::u_matrix::Value( tile.matrix ),
uniforms::u_extrude_scale::Value( extrudeScale ),
diff --git a/src/mbgl/renderer/render_tile.cpp b/src/mbgl/renderer/render_tile.cpp
index 358965847f..1ea39f6bd7 100644
--- a/src/mbgl/renderer/render_tile.cpp
+++ b/src/mbgl/renderer/render_tile.cpp
@@ -99,7 +99,7 @@ void RenderTile::finishRender(PaintParameters& parameters) {
gfx::DepthMode::disabled(),
parameters.stencilModeForClipping(clip),
gfx::ColorMode::unblended(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
*tile.debugBucket->indexBuffer,
tile.debugBucket->segments,
program.computeAllUniformValues(
@@ -121,7 +121,7 @@ void RenderTile::finishRender(PaintParameters& parameters) {
gfx::DepthMode::disabled(),
parameters.stencilModeForClipping(clip),
gfx::ColorMode::unblended(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
*tile.debugBucket->indexBuffer,
tile.debugBucket->segments,
program.computeAllUniformValues(
@@ -145,7 +145,7 @@ void RenderTile::finishRender(PaintParameters& parameters) {
gfx::DepthMode::disabled(),
parameters.stencilModeForClipping(clip),
gfx::ColorMode::unblended(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
parameters.staticData.tileBorderIndexBuffer,
parameters.staticData.tileBorderSegments,
program.computeAllUniformValues(
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index 9575efbb81..aee7a243d4 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -453,7 +453,7 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
gfx::StencilOpType::Replace
},
gfx::ColorMode::disabled(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
parameters.staticData.quadTriangleIndexBuffer,
parameters.staticData.tileTriangleSegments,
program.computeAllUniformValues(
diff --git a/src/mbgl/renderer/sources/render_image_source.cpp b/src/mbgl/renderer/sources/render_image_source.cpp
index 1d1a656363..410491d255 100644
--- a/src/mbgl/renderer/sources/render_image_source.cpp
+++ b/src/mbgl/renderer/sources/render_image_source.cpp
@@ -67,7 +67,7 @@ void RenderImageSource::finishRender(PaintParameters& parameters) {
gfx::DepthMode::disabled(),
gfx::StencilMode::disabled(),
gfx::ColorMode::unblended(),
- gl::CullFaceMode::disabled(),
+ gfx::CullFaceMode::disabled(),
parameters.staticData.tileBorderIndexBuffer,
parameters.staticData.tileBorderSegments,
programInstance.computeAllUniformValues(