From 2375a40b29b5b24a1e4c979afb94bc9fc468b40d Mon Sep 17 00:00:00 2001 From: Yuval Dolev Date: Thu, 16 Jan 2020 01:07:49 +0200 Subject: [PATCH] Ifdefed some debug prints to work only on internal builds. --- platform_mac/mac_4ed.mm | 2 +- platform_mac/mac_4ed_metal.mm | 4 ++++ platform_mac/mac_4ed_opengl.mm | 7 +++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/platform_mac/mac_4ed.mm b/platform_mac/mac_4ed.mm index 228d87bc..7e792f4f 100644 --- a/platform_mac/mac_4ed.mm +++ b/platform_mac/mac_4ed.mm @@ -1283,7 +1283,7 @@ main(int arg_count, char **args){ [mac_vars.window makeKeyAndOrderFront:nil]; // NOTE(yuval): Initialize the renderer - renderer = mac_init_renderer(MacRenderer_OpenGL, mac_vars.window, &target); + renderer = mac_init_renderer(MacRenderer_Metal, mac_vars.window, &target); mac_resize(w, h); diff --git a/platform_mac/mac_4ed_metal.mm b/platform_mac/mac_4ed_metal.mm index 0ce3397d..3b03423b 100644 --- a/platform_mac/mac_4ed_metal.mm +++ b/platform_mac/mac_4ed_metal.mm @@ -15,6 +15,10 @@ struct Mac_Metal{ function mac_render_sig(mac_metal__render){ +#if defined(FRED_INTERNAL) + printf("Redering using Metal!\n"); +#endif + Mac_Metal *metal = (Mac_Metal*)renderer; [metal->view draw]; } diff --git a/platform_mac/mac_4ed_opengl.mm b/platform_mac/mac_4ed_opengl.mm index 7efb31c0..dcfe3715 100644 --- a/platform_mac/mac_4ed_opengl.mm +++ b/platform_mac/mac_4ed_opengl.mm @@ -59,7 +59,6 @@ struct Mac_OpenGL{ // NOTE(yuval): Setup vsync GLint swap_int = 1; - printf("Using vsync: %d\n", swap_int); [[self openGLContext] setValues:&swap_int forParameter:NSOpenGLCPSwapInterval]; } @@ -125,7 +124,9 @@ struct Mac_OpenGL{ function mac_render_sig(mac_gl__render){ - printf("Rendering using OpenGL!\n"); +#if defined(FRED_INTERNAL) + printf("Redering using OpenGL!\n"); +#endif Mac_OpenGL *gl = (Mac_OpenGL*)renderer; [gl->view render:target]; @@ -177,8 +178,6 @@ mac_gl__init(NSWindow *window, Render_Target *target){ // TODO(yuval): This function should be exported to a DLL function mac_load_renderer_sig(mac_load_opengl_renderer){ - printf("Loding The OpenGL Renderer!\n"); - Mac_Renderer *renderer = (Mac_Renderer*)mac_gl__init(window, target); return(renderer); }