MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / text_buffer_check_dirty_inds

Function text_buffer_check_dirty_inds

StereoKitC/systems/text.cpp:85–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83//////////////////////////////////////////
84
85void text_buffer_check_dirty_inds(text_buffer_t& buffer) {
86 if (!buffer.dirty_inds) return;
87 buffer.dirty_inds = false;
88
89 // regenerate indices
90 vind_t quads = (vind_t)(buffer.vert_cap / 4);
91 vind_t *inds = sk_malloc_t(vind_t, quads * 6);
92 for (vind_t i = 0; i < quads; i++) {
93 vind_t q = i * 4;
94 vind_t c = i * 6;
95 inds[c+0] = q+2;
96 inds[c+1] = q+1;
97 inds[c+2] = q;
98
99 inds[c+3] = q+3;
100 inds[c+4] = q+2;
101 inds[c+5] = q;
102 }
103 mesh_set_inds(buffer.mesh, inds, quads * 6);
104 sk_free(inds);
105}
106
107///////////////////////////////////////////
108

Callers 1

text_stepFunction · 0.85

Calls 1

mesh_set_indsFunction · 0.85

Tested by

no test coverage detected