mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Fixes basic water rendering on GLES (replaces GL_QUADS with GL_TRIANGLES).
Sets SDL2 to use correct profile for GLES. Cleans up some old SDL 1.3 version checks. This was SVN commit r14150.
This commit is contained in:
@@ -1399,8 +1399,11 @@ void CPatchRData::BuildWater()
|
||||
|
||||
water_indices.push_back(water_index_map[z + water_cell_size][x - water_cell_size]);
|
||||
water_indices.push_back(water_index_map[z][x - water_cell_size]);
|
||||
water_indices.push_back(water_index_map[z][x]);
|
||||
water_indices.push_back(water_index_map[z + water_cell_size][x]);
|
||||
|
||||
water_indices.push_back(water_index_map[z + water_cell_size][x]);
|
||||
water_indices.push_back(water_index_map[z][x - water_cell_size]);
|
||||
water_indices.push_back(water_index_map[z][x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1439,12 +1442,8 @@ void CPatchRData::RenderWater(CShaderProgramPtr& shader)
|
||||
if (!g_Renderer.m_SkipSubmit)
|
||||
{
|
||||
u8* indexBase = m_VBWaterIndices->m_Owner->Bind();
|
||||
#if CONFIG2_GLES
|
||||
#warning TODO: fix CPatchRData::RenderWater for GLES (avoid GL_QUADS)
|
||||
#else
|
||||
glDrawElements(GL_QUADS, (GLsizei) m_VBWaterIndices->m_Count,
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei) m_VBWaterIndices->m_Count,
|
||||
GL_UNSIGNED_SHORT, indexBase + sizeof(u16)*(m_VBWaterIndices->m_Index));
|
||||
#endif
|
||||
}
|
||||
|
||||
// bump stats
|
||||
|
||||
Reference in New Issue
Block a user