mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 17:53:47 +00:00
parent
5a24f2868b
commit
cd46cc24fa
1 changed files with 17 additions and 15 deletions
|
@ -95,7 +95,8 @@ void GridRender::rebuildBuffers(const std::vector<ObsRow>& rows)
|
|||
{
|
||||
const size_t H = game->getGridSize().y;
|
||||
primIndexInLine.resize(H);
|
||||
|
||||
if(H)
|
||||
{
|
||||
size_t lasty = 0;
|
||||
size_t lastidx = 0;
|
||||
for(size_t i = 0; i < N; ++i)
|
||||
|
@ -115,6 +116,7 @@ void GridRender::rebuildBuffers(const std::vector<ObsRow>& rows)
|
|||
// Don't bother filling the rest, anything beyond the end is eval'd as primsToDraw
|
||||
primIndexInLine.resize(lasty);
|
||||
}
|
||||
}
|
||||
|
||||
// 2 tris = 6 verts per ObsRow, each vertex is 2x uint16, makes 24b per quad.
|
||||
// We could use indexed rendering and use 2 verts less (16b),
|
||||
|
|
Loading…
Reference in a new issue