refactor(render): TextBackend owns its atlas, and staged glyphs carry a rotation basis
This commit is contained in:
1 parent
90e17a0a11
commit
e074f57ddf
23 files changed
+1073
-227
No files matched your search
@@ -55,13 +55,16 @@ class LineVertexArray {
|
||||
};
|
||||
|
||||
/// Vertex array plus instance buffer of the text pipeline: `a_pos` at location 0
|
||||
/// and the glyph's atlas texel origin `a_uv` at location 1, two floats each,
|
||||
/// advancing once per instance.
|
||||
/// (the cell's top-left corner in pixels), the glyph's atlas rect `a_uv` at
|
||||
/// location 1 and its rotation basis `a_axis` at location 2, two floats each,
|
||||
/// every one advancing once per instance. The layout is the one `TextInstance`
|
||||
/// declares and shaders.hpp consumes; a caller never writes a location, stride or
|
||||
/// offset, it stages a `TextBatch` and uploads its `data()`.
|
||||
class TextVertexArray {
|
||||
public:
|
||||
bool create(Status* st = nullptr, UploadMode mode = UploadMode::Orphan) noexcept;
|
||||
|
||||
/// Uploads `glyphs` instances from interleaved `x,y,u,v` floats.
|
||||
/// Uploads `glyphs` instances from interleaved `x,y,u,v,ax,ay` floats.
|
||||
void upload(const f32* interleaved, u32 glyphs) noexcept;
|
||||
|
||||
void bind() const noexcept { vao_.bind(); }
|
||||
|
||||
Reference in new issue
Block a user