Implement color based debugging

This commit is contained in:
2023-09-22 21:36:43 +02:00
parent 09aed0ffc4
commit dec085ab70
2 changed files with 31 additions and 4 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#include "../GPU/gpu_internal.hpp"
#include <stdio.h>
namespace JabyEngine {
#define __debug_boot_color_at(color, diag) { \
::JabyEngine::GPU::internal::quick_fill_fast(color, {{diag*64, diag*64}, {64, 64}}); \
}
#define __debug_boot_print_at(color, diag, ...) { \
__debug_boot_color_at(color, diag); \
printf(__VA_ARGS__); \
}
#define __debug_boot_color0(color) __debug_boot_color_at(color, 0)
#define __debug_boot_color1(color) __debug_boot_color_at(color, 1)
#define __debug_boot_color2(color) __debug_boot_color_at(color, 2)
#define __debug_boot_print0(color, ...) __debug_boot_print_at(color, 0, __VA_ARGS__)
#define __debug_boot_print1(color, ...) __debug_boot_print_at(color, 1, __VA_ARGS__)
#define __debug_boot_print2(color, ...) __debug_boot_print_at(color, 2, __VA_ARGS__)
}