From e58028ae1888a76728871ae7123f52c612a22e9d Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 19 Jul 2022 20:57:12 +0200 Subject: [PATCH] Do not mix debug prints and stdout data stream Signed-off-by: David Oberhollenzer --- shadermeh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shadermeh.c b/shadermeh.c index f02054c..1c1e876 100644 --- a/shadermeh.c +++ b/shadermeh.c @@ -179,7 +179,9 @@ int main(int argc, char **argv) glGetIntegerv(GL_MAJOR_VERSION, &major); glGetIntegerv(GL_MINOR_VERSION, &minor); - printf("OpenGL version %d.%d\n", major, minor); + + if (!to_stdout) + printf("OpenGL version %d.%d\n", major, minor); /******************** initialization ********************/ glViewport(0, 0, width, height);