mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
add debug GUI render mode (F8)
This commit is contained in:
parent
a74a4fcf53
commit
5af6b91b22
18 changed files with 93 additions and 29 deletions
|
|
@ -142,7 +142,7 @@ void Batch2D::rect(
|
|||
bool flippedY,
|
||||
glm::vec4 tint
|
||||
) {
|
||||
if (index + 6*B2D_VERTEX_SIZE >= capacity) {
|
||||
if (index + 6 * B2D_VERTEX_SIZE >= capacity) {
|
||||
flush();
|
||||
}
|
||||
setPrimitive(DrawPrimitive::triangle);
|
||||
|
|
@ -230,6 +230,11 @@ void Batch2D::rect(
|
|||
}
|
||||
|
||||
void Batch2D::lineRect(float x, float y, float w, float h) {
|
||||
if (index + 8 * B2D_VERTEX_SIZE >= capacity) {
|
||||
flush();
|
||||
}
|
||||
setPrimitive(DrawPrimitive::line);
|
||||
|
||||
vertex(x, y, 0.0f, 0.0f, color.r, color.g, color.b, color.a);
|
||||
vertex(x, y+h, 0.0f, 1.0f, color.r, color.g, color.b, color.a);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue