[core] set u_texture uniform value

fix #1685
This commit is contained in:
Ansis Brammanis
2016-01-12 17:13:11 -08:00
parent e577354567
commit f7acc91d21
3 changed files with 4 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ void Painter::renderSDF(SymbolBucket &bucket,
sdfShader.u_exmatrix = exMatrix;
sdfShader.u_texsize = texsize;
sdfShader.u_skewed = skewed;
sdfShader.u_texture = 0;
// adjust min/max zooms for variable font sies
float zoomAdjust = std::log(fontSize / bucketProperties.size) / std::log(2);
@@ -232,6 +233,7 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
iconShader->u_texsize = {{ float(spriteAtlas->getWidth()) / 4.0f, float(spriteAtlas->getHeight()) / 4.0f }};
iconShader->u_skewed = skewed;
iconShader->u_extra = extra;
iconShader->u_texture = 0;
// adjust min/max zooms for variable font sies
float zoomAdjust = std::log(fontSize / layout.icon.size) / std::log(2);

View File

@@ -23,6 +23,7 @@ public:
Uniform<std::array<GLfloat, 2>> u_texsize = {"u_texsize", *this};
Uniform<GLint> u_skewed = {"u_skewed", *this};
Uniform<GLfloat> u_extra = {"u_extra", *this};
Uniform<GLint> u_texture = {"u_texture", *this};
protected:
GLint a_offset = -1;

View File

@@ -22,6 +22,7 @@ public:
Uniform<GLfloat> u_maxfadezoom = {"u_maxfadezoom", *this};
Uniform<GLfloat> u_fadezoom = {"u_fadezoom", *this};
Uniform<GLint> u_skewed = {"u_skewed", *this};
Uniform<GLint> u_texture = {"u_texture", *this};
protected:
GLint a_offset = -1;