[DEV] set text testing depth

This commit is contained in:
Edouard DUPIN 2013-03-15 07:35:05 +01:00
parent 90bb349138
commit 9a84c63701
2 changed files with 8 additions and 4 deletions

View File

@ -98,7 +98,7 @@ void ewol::Text::LoadProgram(void)
}
}
void ewol::Text::Draw(const mat4& transformationMatrix)
void ewol::Text::Draw(const mat4& transformationMatrix, bool enableDepthTest)
{
// draw BG in any case:
@ -117,7 +117,9 @@ void ewol::Text::Draw(const mat4& transformationMatrix)
EWOL_ERROR("No shader ...");
return;
}
ewol::openGL::Disable(ewol::openGL::FLAG_DEPTH_TEST);
if (true==enableDepthTest) {
ewol::openGL::Enable(ewol::openGL::FLAG_DEPTH_TEST);
}
// set Matrix : translation/positionMatrix
mat4 projMatrix = ewol::openGL::GetMatrix();
mat4 camMatrix = ewol::openGL::GetCameraMatrix();
@ -135,7 +137,9 @@ void ewol::Text::Draw(const mat4& transformationMatrix)
// Request the draw od the elements :
ewol::openGL::DrawArrays(GL_TRIANGLES, 0, m_coord.Size());
m_GLprogram->UnUse();
ewol::openGL::Enable(ewol::openGL::FLAG_DEPTH_TEST);
if (true==enableDepthTest) {
ewol::openGL::Disable(ewol::openGL::FLAG_DEPTH_TEST);
}
}

View File

@ -119,7 +119,7 @@ namespace ewol
* @brief Draw All the refistered text in the current element on openGL
*/
void Draw(void);
void Draw(const mat4& transformationMatrix);
void Draw(const mat4& transformationMatrix, bool enableDepthTest=false);
/**
* @brief Clear all the registered element in the current element
*/