two render passes

Conflicts:
	resources/style.pbf
	src/renderer/painter.cpp
	src/style/resources.cpp
This commit is contained in:
Konstantin Käfer
2014-03-10 13:48:06 +01:00
parent a1ebf3f264
commit 978b714de8
4 changed files with 144 additions and 130 deletions

View File

@@ -35,6 +35,7 @@
#ifdef GL_ES_VERSION_2_0
#define glClearDepth glClearDepthf
#define glDepthRange glDepthRangef
#endif
void _CHECK_GL_ERROR(const char *cmd, const char *file, int line);

View File

@@ -35,7 +35,6 @@ public:
void changeMatrix();
void render(const Tile& tile);
void renderMatte();
void renderBackground();
void renderFill(FillBucket& bucket, const std::string& layer_name, const Tile::ID& id);
void renderLine(LineBucket& bucket, const std::string& layer_name, const Tile::ID& id);
void renderPoint(PointBucket& bucket, const std::string& layer_name, const Tile::ID& id);
@@ -48,6 +47,7 @@ public:
private:
void setupShaders();
void renderLayers(const std::shared_ptr<TileData>& tile, const std::vector<LayerDescription>& layers);
void renderLayer(const std::shared_ptr<TileData>& tile_data, const LayerDescription& layer_desc);
void renderDebug(const std::shared_ptr<TileData>& tile);
void useProgram(uint32_t program);
@@ -65,9 +65,14 @@ private:
Settings& settings;
Style& style;
uint32_t gl_program = 0;
float gl_lineWidth = 0;
bool gl_depthMask = true;
float strata = 0;
const float strata_epsilon = 1.0f / (1 << 16);
enum { Opaque, Translucent } pass = Opaque;
std::unique_ptr<PlainShader> plainShader;
std::unique_ptr<OutlineShader> outlineShader;