-
-
Notifications
You must be signed in to change notification settings - Fork 333
/
render_static_data.hpp
52 lines (39 loc) · 1.52 KB
/
render_static_data.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include <mbgl/gfx/vertex_buffer.hpp>
#include <mbgl/gfx/index_buffer.hpp>
#include <mbgl/gfx/renderbuffer.hpp>
#include <mbgl/programs/background_program.hpp>
#include <mbgl/programs/heatmap_texture_program.hpp>
#include <mbgl/programs/programs.hpp>
#include <mbgl/programs/raster_program.hpp>
#include <string>
#include <optional>
namespace mbgl {
namespace gfx {
class Context;
class UploadPass;
} // namespace gfx
class RenderStaticData {
public:
RenderStaticData(gfx::Context&, float pixelRatio);
void upload(gfx::UploadPass&);
std::optional<gfx::VertexBuffer<gfx::Vertex<PositionOnlyLayoutAttributes>>> tileVertexBuffer;
std::optional<gfx::VertexBuffer<RasterLayoutVertex>> rasterVertexBuffer;
std::optional<gfx::VertexBuffer<HeatmapTextureLayoutVertex>> heatmapTextureVertexBuffer;
std::optional<gfx::IndexBuffer> quadTriangleIndexBuffer;
std::optional<gfx::IndexBuffer> tileBorderIndexBuffer;
static SegmentVector<BackgroundAttributes> tileTriangleSegments();
static SegmentVector<DebugAttributes> tileBorderSegments();
static SegmentVector<RasterAttributes> rasterSegments();
static SegmentVector<HeatmapTextureAttributes> heatmapTextureSegments();
std::optional<gfx::Renderbuffer<gfx::RenderbufferPixelType::Depth>> depthRenderbuffer;
bool has3D = false;
bool uploaded = false;
Size backendSize;
Programs programs;
const SegmentVector<BackgroundAttributes> clippingMaskSegments;
#ifndef NDEBUG
Programs overdrawPrograms;
#endif
};
} // namespace mbgl