MCPcopy Create free account
hub / github.com/davemoore22/sorcery / _set_vertex_array

Method _set_vertex_array

src/core/render.cpp:139–155  ·  view source on GitHub ↗

Note Texture Coordinates (e.g. the source) is set by _set_texture_coordinates above, not here

Source from the content-addressed store, hash-verified

137// Note Texture Coordinates (e.g. the source) is set by _set_texture_coordinates
138// above, not here
139auto Sorcery::Render::_set_vertex_array(VertexArray &array, ImVec2 p1,
140 ImVec2 p2, ImVec2 p3, ImVec2 p4)
141 -> void {
142
143 ImVec4 colour{1.0f, 1.0f, 1.0f, _ctx.animation->fade};
144
145 // As we resized up the view, we resize it here too
146 auto scale{4};
147 array[0].position = ImVec2{p1.x * scale, p1.y * scale};
148 array[1].position = ImVec2{p2.x * scale, p2.y * scale};
149 array[2].position = ImVec2{p3.x * scale, p3.y * scale};
150 array[3].position = ImVec2{p4.x * scale, p4.y * scale};
151 array[0].colour = colour;
152 array[1].colour = colour;
153 array[2].colour = colour;
154 array[3].colour = colour;
155}
156
157// Note Texture Coordinates (e.g. the source) is set by _set_texture_coordinates
158// above, not here

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected