diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-07-08 16:14:22 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-09-26 11:14:40 +0200 |
commit | adcb449ff348a3ae5f74c38824ae43718122dafa (patch) | |
tree | 4d5c204ff3f6e26ca0ae33cd5cbf2b10b88d97b5 /src | |
parent | bf18c330406a44b36218aab20a11b74f0151f6e7 (diff) | |
download | qtlocation-mapboxgl-adcb449ff348a3ae5f74c38824ae43718122dafa.tar.gz |
[core] make GL value defaults constexpr
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/gl/gl_config.cpp | 32 | ||||
-rw-r--r-- | src/mbgl/gl/gl_values.cpp | 32 |
2 files changed, 32 insertions, 32 deletions
diff --git a/src/mbgl/gl/gl_config.cpp b/src/mbgl/gl/gl_config.cpp deleted file mode 100644 index 9031c3d34f..0000000000 --- a/src/mbgl/gl/gl_config.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "gl_config.hpp" - -namespace mbgl { -namespace gl { - -const StencilFunc::Type StencilFunc::Default = { GL_ALWAYS, 0, ~0u }; -const StencilMask::Type StencilMask::Default = ~0u; -const StencilTest::Type StencilTest::Default = GL_FALSE; -const StencilOp::Type StencilOp::Default = { GL_KEEP, GL_KEEP, GL_REPLACE }; -const DepthRange::Type DepthRange::Default = { 0, 1 }; -const DepthMask::Type DepthMask::Default = GL_TRUE; -const DepthTest::Type DepthTest::Default = GL_FALSE; -const DepthFunc::Type DepthFunc::Default = GL_LEQUAL; -const Blend::Type Blend::Default = GL_TRUE; -const BlendFunc::Type BlendFunc::Default = { GL_ONE, GL_ONE_MINUS_SRC_ALPHA }; -const BlendColor::Type BlendColor::Default = { 0, 0, 0, 0 }; -const ColorMask::Type ColorMask::Default = { GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE }; -const ClearDepth::Type ClearDepth::Default = 1; -const ClearColor::Type ClearColor::Default = { 0, 0, 0, 0 }; -const ClearStencil::Type ClearStencil::Default = 0; -const Program::Type Program::Default = 0; -const LineWidth::Type LineWidth::Default = 1; -const ActiveTexture::Type ActiveTexture::Default = 0; -const BindTexture::Type BindTexture::Default = 0; - -#ifndef GL_ES_VERSION_2_0 -const PixelZoom::Type PixelZoom::Default = { 1, 1 }; -const RasterPos::Type RasterPos::Default = {{ 0, 0, 0, 0 }}; -#endif // GL_ES_VERSION_2_0 - -} // namespace gl -} // namespace mbgl diff --git a/src/mbgl/gl/gl_values.cpp b/src/mbgl/gl/gl_values.cpp new file mode 100644 index 0000000000..04a3026e24 --- /dev/null +++ b/src/mbgl/gl/gl_values.cpp @@ -0,0 +1,32 @@ +#include <mbgl/gl/gl_values.hpp> + +namespace mbgl { +namespace gl { + +const constexpr StencilFunc::Type StencilFunc::Default; +const constexpr StencilMask::Type StencilMask::Default; +const constexpr StencilTest::Type StencilTest::Default; +const constexpr StencilOp::Type StencilOp::Default; +const constexpr DepthRange::Type DepthRange::Default; +const constexpr DepthMask::Type DepthMask::Default; +const constexpr DepthTest::Type DepthTest::Default; +const constexpr DepthFunc::Type DepthFunc::Default; +const constexpr Blend::Type Blend::Default; +const constexpr BlendFunc::Type BlendFunc::Default; +const constexpr BlendColor::Type BlendColor::Default; +const constexpr ColorMask::Type ColorMask::Default; +const constexpr ClearDepth::Type ClearDepth::Default; +const constexpr ClearColor::Type ClearColor::Default; +const constexpr ClearStencil::Type ClearStencil::Default; +const constexpr Program::Type Program::Default; +const constexpr LineWidth::Type LineWidth::Default; +const constexpr ActiveTexture::Type ActiveTexture::Default; +const constexpr BindTexture::Type BindTexture::Default; + +#ifndef GL_ES_VERSION_2_0 +const constexpr PixelZoom::Type PixelZoom::Default; +const constexpr RasterPos::Type RasterPos::Default; +#endif // GL_ES_VERSION_2_0 + +} // namespace gl +} // namespace mbgl |