Graphics: Remove sprite limit

This commit is contained in:
Lynix
2019-03-31 16:31:02 +02:00
parent 03e2bfb833
commit 0ca823f9a6
5 changed files with 347 additions and 258 deletions

View File

@@ -51,8 +51,16 @@ namespace Nz
int textureOverlay;
};
struct SpriteBatch
{
std::size_t spriteCount;
const Material* material;
const Texture* overlayTexture;
Recti scissorRect;
};
mutable std::unordered_map<const Shader*, ShaderUniforms> m_shaderUniforms;
mutable std::vector<std::pair<const VertexStruct_XYZ_Color_UV*, std::size_t>> m_spriteChains;
mutable std::vector<SpriteBatch> m_spriteBatches;
Buffer m_vertexBuffer;
RenderStates m_clearStates;
ShaderRef m_clearShader;

View File

@@ -61,8 +61,16 @@ namespace Nz
int textureOverlay;
};
struct SpriteBatch
{
std::size_t spriteCount;
const Material* material;
const Texture* overlayTexture;
Recti scissorRect;
};
mutable std::unordered_map<const Shader*, ShaderUniforms> m_shaderUniforms;
mutable std::vector<std::pair<const VertexStruct_XYZ_Color_UV*, std::size_t>> m_spriteChains;
mutable std::vector<SpriteBatch> m_spriteBatches;
Buffer m_vertexBuffer;
RenderStates m_clearStates;
ShaderRef m_clearShader;