mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Always use explicitly typed buffers, even in internal code
This commit is contained in:
@@ -62,7 +62,8 @@ void Text::uploadVertices(const std::vector<Font::GlyphVertex> &vertices, size_t
|
||||
|
||||
auto gfx = Module::getInstance<Graphics>(Module::M_GRAPHICS);
|
||||
Buffer::Settings settings(Buffer::TYPEFLAG_VERTEX, 0, BUFFERUSAGE_DYNAMIC);
|
||||
Buffer *new_buffer = gfx->newBuffer(settings, nullptr, newsize);
|
||||
auto decl = Buffer::getCommonFormatDeclaration(Font::vertexFormat);
|
||||
Buffer *new_buffer = gfx->newBuffer(settings, decl, nullptr, newsize, 0);
|
||||
|
||||
if (vertex_buffer != nullptr)
|
||||
vertex_buffer->copyTo(0, vertex_buffer->getSize(), new_buffer, 0);
|
||||
|
||||
Reference in New Issue
Block a user