[Android] Fix drawn buttons causing rendering issues.

This commit is contained in:
Ryan Houdek 2013-06-11 08:23:32 -05:00
parent a1276efe17
commit 8efdbcda9e
1 changed files with 5 additions and 3 deletions

View File

@ -37,9 +37,6 @@ namespace ButtonManager
void Init()
{
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
// Initialize our buttons
m_buttons.push_back(new Button("ButtonA.png", BUTTON_A, m_coords[0]));
m_buttons.push_back(new Button("ButtonB.png", BUTTON_B, m_coords[1]));
@ -83,8 +80,13 @@ namespace ButtonManager
void DrawButtons()
{
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
for(auto it = m_buttons.begin(); it != m_buttons.end(); ++it)
DrawButton((*it)->GetTexture(), (*it)->GetCoords());
glDisable(GL_BLEND);
}
}