add additional debug level

This commit is contained in:
Luca Conte 2025-03-06 01:32:46 +01:00
parent 5d3fb630c9
commit 501183c420
1 changed files with 6 additions and 3 deletions

View File

@ -14,14 +14,14 @@ void init(void) {
INFO("Compiling Vertex Shader...\n"); INFO("Compiling Vertex Shader...\n");
ShaderCompileResult vertexShader = readAndCompileShaderFromFile("src/shaders/vertex.glsl", GL_VERTEX_SHADER); ShaderCompileResult vertexShader = readAndCompileShaderFromFile("src/shaders/vertex.glsl", GL_VERTEX_SHADER);
// create and compile fragment shader
ShaderCompileResult fragmentShader = readAndCompileShaderFromFile("src/shaders/fragment.glsl", GL_FRAGMENT_SHADER);
if (!vertexShader.success) { if (!vertexShader.success) {
FATAL("Failed to compile Vertex Shader\n"); FATAL("Failed to compile Vertex Shader\n");
exit(1); exit(1);
} }
// create and compile fragment shader
INFO("Compiling Fragment Shader...\n");
ShaderCompileResult fragmentShader = readAndCompileShaderFromFile("src/shaders/fragment.glsl", GL_FRAGMENT_SHADER);
if (!fragmentShader.success) { if (!fragmentShader.success) {
FATAL("Failed to compile Vertex Shader\n"); FATAL("Failed to compile Vertex Shader\n");
exit(1); exit(1);
@ -49,6 +49,9 @@ int main(int argc, char const *argv[])
for (int i = 1; i < argc; i++) { for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "-v") == 0) { if (strcmp(argv[i], "-v") == 0) {
logLevel = LOG_LEVEL_INFO;
}
if (strcmp(argv[i], "-vv") == 0) {
logLevel = LOG_LEVEL_DEBUG; logLevel = LOG_LEVEL_DEBUG;
} }
} }