Fix Android compilation

This commit is contained in:
def 2014-10-28 02:01:51 +01:00
parent 24bd595fad
commit 3730e19b5c
2 changed files with 8 additions and 0 deletions

View file

@ -329,15 +329,19 @@ void CCommandProcessorFragment_OpenGL::Cmd_Render(const CCommandBuffer::SCommand
switch(pCommand->m_PrimType)
{
case CCommandBuffer::PRIMTYPE_QUADS:
#if !defined(__ANDROID__)
if(g_Config.m_GfxQuadsAsTriangles)
#endif
{
for( unsigned i = 0, j = pCommand->m_PrimCount; i < j; i++ )
glDrawArrays(GL_TRIANGLE_FAN, i*4, 4);
}
#if !defined(__ANDROID__)
else
{
glDrawArrays(GL_QUADS, 0, pCommand->m_PrimCount*4);
}
#endif
break;
case CCommandBuffer::PRIMTYPE_LINES:
glDrawArrays(GL_LINES, 0, pCommand->m_PrimCount*2);

View file

@ -99,15 +99,19 @@ void CGraphics_OpenGL::Flush()
{
if(m_Drawing == DRAWING_QUADS)
{
#if !defined(__ANDROID__)
if(g_Config.m_GfxQuadsAsTriangles)
#endif
{
for( unsigned i = 0, j = m_NumVertices; i < j; i += 4 )
glDrawArrays(GL_TRIANGLE_FAN, i, 4);
}
#if !defined(__ANDROID__)
else
{
glDrawArrays(GL_QUADS, 0, m_NumVertices);
}
#endif
}
else if(m_Drawing == DRAWING_LINES)
glDrawArrays(GL_LINES, 0, m_NumVertices);