65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
namespace mbgl {
|
|
|
|
using EnumType = uint32_t;
|
|
|
|
enum class MapMode : EnumType {
|
|
Continuous, // continually updating map
|
|
Still, // a once-off still image
|
|
};
|
|
|
|
// We can avoid redundant GL calls when it is known that the GL context is not
|
|
// being shared. In a shared GL context case, we need to make sure that the
|
|
// correct GL configurations are in use - they might have changed between render
|
|
// calls.
|
|
enum class GLContextMode : EnumType {
|
|
Unique,
|
|
Shared,
|
|
};
|
|
|
|
// We can choose to constrain the map both horizontally or vertically, or only
|
|
// vertically e.g. while panning.
|
|
enum class ConstrainMode : EnumType {
|
|
None,
|
|
HeightOnly,
|
|
WidthAndHeight,
|
|
};
|
|
|
|
// Satisfies embedding platforms that requires the viewport coordinate systems
|
|
// to be set according to its standards.
|
|
enum class ViewportMode : EnumType {
|
|
Default,
|
|
FlippedY,
|
|
};
|
|
|
|
enum class MapDebugOptions : EnumType {
|
|
NoDebug = 0,
|
|
TileBorders = 1 << 1,
|
|
ParseStatus = 1 << 2,
|
|
Timestamps = 1 << 3,
|
|
Collision = 1 << 4,
|
|
Wireframe = 1 << 5,
|
|
// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/5117
|
|
#ifndef GL_ES_VERSION_2_0
|
|
StencilClip = 1 << 6,
|
|
#endif // GL_ES_VERSION_2_0
|
|
};
|
|
|
|
inline MapDebugOptions operator| (const MapDebugOptions& lhs, const MapDebugOptions& rhs) {
|
|
return MapDebugOptions(static_cast<EnumType>(lhs) | static_cast<EnumType>(rhs));
|
|
}
|
|
|
|
inline MapDebugOptions& operator|=(MapDebugOptions& lhs, const MapDebugOptions& rhs) {
|
|
lhs = lhs | rhs;
|
|
return lhs;
|
|
}
|
|
|
|
inline bool operator& (const MapDebugOptions& lhs, const MapDebugOptions& rhs) {
|
|
return static_cast<EnumType>(lhs) & static_cast<EnumType>(rhs);
|
|
}
|
|
|
|
} // namespace mbgl
|