made a lot of changes, to get the render pipeline working
This commit is contained in:
@@ -171,9 +171,7 @@ void TSE::GLFW::BasicTileMapShader::OnSubmit(const Transformable &t, float *&tar
|
||||
SpriteCount = tileSet->GetCount();
|
||||
SpriteScale = tm->SpriteScale;
|
||||
|
||||
const int chunkcount = tm->GetChunkCount();
|
||||
Vector2 orderedChunks[chunkcount];
|
||||
tm->GetChunkPositionsInOrder(orderedChunks);
|
||||
const std::vector<Vector2> orderedChunks = *tm->GetChunkPositionsInOrder();
|
||||
|
||||
Matrix4x4 matr = t.GetLocalMatrix();
|
||||
|
||||
@@ -183,10 +181,8 @@ void TSE::GLFW::BasicTileMapShader::OnSubmit(const Transformable &t, float *&tar
|
||||
{
|
||||
auto chunk = tm->GetChunk(chunkPos);
|
||||
const int spriteCount = chunk->GetSpriteCount();
|
||||
Vector2 spritePositions[spriteCount];
|
||||
int spriteIds[spriteCount];
|
||||
chunk->GetOrderedPositions(spritePositions);
|
||||
chunk->GetOrderedSpriteIds(spriteIds);
|
||||
const std::vector<Vector2> spritePositions = *chunk->GetOrderedPositions();
|
||||
const std::vector<Vector2i> spriteIds = *chunk->GetOrderedSpriteIds();
|
||||
int chunkSize = chunk->GetChunksize();
|
||||
|
||||
for (int i = 0; i < spriteCount; i++)
|
||||
@@ -198,7 +194,7 @@ void TSE::GLFW::BasicTileMapShader::OnSubmit(const Transformable &t, float *&tar
|
||||
*target++ = pos.x;
|
||||
*target++ = pos.y;
|
||||
*target++ = pos.z;
|
||||
*target++ = spriteIds[i];
|
||||
*target++ = spriteIds[i].x;
|
||||
|
||||
++instanceCount;
|
||||
stack.Pop();
|
||||
|
||||
Reference in New Issue
Block a user