mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Abstracted lower level drawing code, moved all type-specific drawing code out of opengl backend, deleted obsolete files
--HG-- branch : minor
This commit is contained in:
@@ -266,7 +266,16 @@ void Text::draw(Graphics *gfx, const Matrix4 &m)
|
||||
|
||||
Graphics::TempTransform transform(gfx, m);
|
||||
|
||||
drawInternal(draw_commands);
|
||||
size_t elemsize = quadIndices.getElementSize();
|
||||
IndexDataType datatype = quadIndices.getType();
|
||||
Buffer *indexbuffer = quadIndices.getBuffer();
|
||||
|
||||
for (const Font::DrawCommand &cmd : draw_commands)
|
||||
{
|
||||
int count = (cmd.vertexcount / 4) * 6;
|
||||
size_t offset = (cmd.startvertex / 4) * 6 * elemsize;
|
||||
gfx->drawIndexed(PRIMITIVE_TRIANGLES, count, 1, datatype, indexbuffer, offset, vertexAttributes, vertexBuffers, cmd.texture);
|
||||
}
|
||||
}
|
||||
|
||||
} // graphics
|
||||
|
||||
Reference in New Issue
Block a user