summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-18 12:03:47 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-20 13:24:20 +0300
commit7e549b90202655ca0de9f503178f42012c534dbc (patch)
tree8bb7ca4c4bb1a975082892c4b46d047e6462df28 /include
parent9038d66af60bca616d0f34cda593409daa06271c (diff)
downloadqtlocation-mapboxgl-7e549b90202655ca0de9f503178f42012c534dbc.tar.gz
[core] Added BlendColor GL config value
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/gl/gl_values.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/mbgl/gl/gl_values.hpp b/include/mbgl/gl/gl_values.hpp
index 34932dd408..1e05984fbc 100644
--- a/include/mbgl/gl/gl_values.hpp
+++ b/include/mbgl/gl/gl_values.hpp
@@ -214,6 +214,19 @@ constexpr bool operator!=(const BlendFunc::Type& a, const BlendFunc::Type& b) {
return a.sfactor != b.sfactor || a.dfactor != b.dfactor;
}
+struct BlendColor {
+ using Type = Color;
+ static const Type Default;
+ inline static void Set(const Type& value) {
+ MBGL_CHECK_ERROR(glBlendColor(value.r, value.g, value.b, value.a));
+ }
+ inline static Type Get() {
+ GLfloat floats[4];
+ MBGL_CHECK_ERROR(glGetFloatv(GL_BLEND_COLOR, floats));
+ return { floats[0], floats[1], floats[2], floats[3] };
+ }
+};
+
struct Program {
using Type = GLuint;
static const Type Default;