Tango: added online blending option, background color option, double tap, fixed meshes jiggering on touch, removed raw mesh option

This commit is contained in:
matlabbe
2017-04-17 21:42:01 -04:00
parent 6f148c47e2
commit 0ccba3281e
21 changed files with 563 additions and 220 deletions
@@ -41,6 +41,7 @@ public class Renderer implements GLSurfaceView.Renderer {
private TextManager mTextManager = null;
private float mSurfaceHeight = 0.0f;
private float mTextColor = 1.0f;
private Vector<TextObject> mTexts;
@@ -174,9 +175,7 @@ public class Renderer implements GLSurfaceView.Renderer {
// Create our text manager
mTextManager = new TextManager(mActivity);
GLES20.glEnable(GLES20.GL_BLEND);
GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA);
mTextManager.setColor(mTextColor);
}
public void updateTexts(String[] texts)
@@ -208,4 +207,13 @@ public class Renderer implements GLSurfaceView.Renderer {
mTextChanged = true;
}
}
public void setTextColor(float color)
{
mTextColor = color;
if(mTextManager != null)
{
mTextManager.setColor(mTextColor);
}
}
}