Merge branch 'master' into libuv010
This commit is contained in:
@@ -3,13 +3,14 @@
|
||||
|
||||
#include <mbgl/geometry/buffer.hpp>
|
||||
#include <mbgl/geometry/vao.hpp>
|
||||
#include <mbgl/util/noncopyable.hpp>
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
template <int count>
|
||||
struct ElementGroup {
|
||||
struct ElementGroup : public util::noncopyable {
|
||||
std::array<VertexArrayObject, count> array;
|
||||
uint32_t vertex_length;
|
||||
uint32_t elements_length;
|
||||
@@ -19,6 +20,11 @@ struct ElementGroup {
|
||||
: vertex_length(vertex_length),
|
||||
elements_length(elements_length) {
|
||||
}
|
||||
|
||||
ElementGroup(ElementGroup &&rhs) noexcept
|
||||
: array(std::move(rhs.array)),
|
||||
vertex_length(rhs.vertex_length),
|
||||
elements_length(rhs.elements_length) {};
|
||||
};
|
||||
|
||||
class TriangleElementsBuffer : public Buffer<
|
||||
|
||||
@@ -3,14 +3,25 @@
|
||||
|
||||
#include <mbgl/shader/shader.hpp>
|
||||
#include <mbgl/platform/gl.hpp>
|
||||
#include <mbgl/util/noncopyable.hpp>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
#if GL_ARB_vertex_array_object
|
||||
class VertexArrayObject {
|
||||
class VertexArrayObject : public util::noncopyable {
|
||||
public:
|
||||
inline VertexArrayObject() {};
|
||||
|
||||
inline VertexArrayObject(VertexArrayObject &&rhs) noexcept
|
||||
: vao(rhs.vao),
|
||||
bound_shader(rhs.bound_shader),
|
||||
bound_shader_name(rhs.bound_shader_name),
|
||||
bound_vertex_buffer(rhs.bound_vertex_buffer),
|
||||
bound_elements_buffer(rhs.bound_elements_buffer),
|
||||
bound_offset(rhs.bound_offset) {};
|
||||
|
||||
template <typename Shader, typename VertexBuffer>
|
||||
inline void bind(Shader& shader, VertexBuffer &vertexBuffer, char *offset) {
|
||||
bindVertexArrayObject();
|
||||
@@ -56,7 +67,7 @@ private:
|
||||
|
||||
#else
|
||||
|
||||
class VertexArrayObject {
|
||||
class VertexArrayObject : public util::noncopyable {
|
||||
public:
|
||||
template <typename Shader, typename Buffers>
|
||||
void bind(Shader& shader, Buffers& buffers, char *offset) {
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace mbgl {
|
||||
enum class EventSeverity : uint8_t {
|
||||
Debug,
|
||||
Info,
|
||||
Test,
|
||||
Warning,
|
||||
Error,
|
||||
};
|
||||
@@ -18,7 +17,6 @@ enum class EventSeverity : uint8_t {
|
||||
MBGL_DEFINE_ENUM_CLASS(EventSeverityClass, EventSeverity, {
|
||||
{ EventSeverity::Debug, "DEBUG" },
|
||||
{ EventSeverity::Info, "INFO" },
|
||||
{ EventSeverity::Test, "TEST" },
|
||||
{ EventSeverity::Warning, "WARNING" },
|
||||
{ EventSeverity::Error, "ERROR" },
|
||||
{ EventSeverity(-1), "UNKNOWN" },
|
||||
@@ -61,9 +59,6 @@ constexpr EventSeverity disabledEventSeverities[] = {
|
||||
#if !DEBUG
|
||||
EventSeverity::Debug,
|
||||
#endif
|
||||
#if !TESTING
|
||||
EventSeverity::Test,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class FillBucket : public Bucket {
|
||||
|
||||
typedef ElementGroup<2> triangle_group_type;
|
||||
typedef ElementGroup<1> line_group_type;
|
||||
|
||||
public:
|
||||
FillBucket(FillVertexBuffer& vertexBuffer,
|
||||
TriangleElementsBuffer& triangleElementsBuffer,
|
||||
|
||||
@@ -22,6 +22,7 @@ struct pbf;
|
||||
class LineBucket : public Bucket {
|
||||
typedef ElementGroup<1> triangle_group_type;
|
||||
typedef ElementGroup<1> point_group_type;
|
||||
|
||||
public:
|
||||
LineBucket(LineVertexBuffer& vertexBuffer,
|
||||
TriangleElementsBuffer& triangleElementsBuffer,
|
||||
@@ -43,7 +44,6 @@ public:
|
||||
const StyleBucketLine &properties;
|
||||
|
||||
private:
|
||||
|
||||
LineVertexBuffer& vertexBuffer;
|
||||
TriangleElementsBuffer& triangleElementsBuffer;
|
||||
PointElementsBuffer& pointElementsBuffer;
|
||||
|
||||
@@ -184,12 +184,9 @@ public:
|
||||
};
|
||||
|
||||
VertexArrayObject coveringPlainArray;
|
||||
VertexArrayObject coveringPatternArray;
|
||||
VertexArrayObject coveringRasterArray;
|
||||
VertexArrayObject coveringGaussianArray;
|
||||
|
||||
VertexArrayObject matteArray;
|
||||
|
||||
// Set up the tile boundary lines we're using to draw the tile outlines.
|
||||
StaticVertexBuffer tileBorderBuffer = {
|
||||
{ 0, 0 },
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
std::string percentEncode(const std::string&);
|
||||
std::string percentDecode(const std::string&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user