mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix Android compilation
This commit is contained in:
parent
24bd595fad
commit
3730e19b5c
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue