mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-24 17:26:41 +00:00
fix IBO generation...oops
This commit is contained in:
parent
71f9120c30
commit
2f7dd87d8b
1 changed files with 2 additions and 4 deletions
|
@ -327,8 +327,7 @@ size_t DynamicGPUBuffer::initGridIndices_Triangles(size_t w, size_t h, bool inve
|
|||
// top to bottom
|
||||
for(size_t y = 0; y < quadsy; ++y)
|
||||
{
|
||||
size_t i = y * w;
|
||||
for(size_t x = 0; x < quadsx; ++x)
|
||||
for(size_t x = 0, i = y * w; x < quadsx; ++x, ++i)
|
||||
{
|
||||
*p++ = (unsigned short)(i); // 0
|
||||
*p++ = (unsigned short)(i + 1); // 1
|
||||
|
@ -345,8 +344,7 @@ size_t DynamicGPUBuffer::initGridIndices_Triangles(size_t w, size_t h, bool inve
|
|||
// bottom to top
|
||||
for(size_t y = quadsy; y --> 0; )
|
||||
{
|
||||
size_t i = y * w;
|
||||
for(size_t x = 0; x < quadsx; ++x)
|
||||
for(size_t x = 0, i = y * w; x < quadsx; ++x, ++i)
|
||||
{
|
||||
*p++ = (unsigned short)(i); // 0
|
||||
*p++ = (unsigned short)(i + 1); // 1
|
||||
|
|
Loading…
Reference in a new issue