Ifdefed some debug prints to work only on internal builds.

master
Yuval Dolev 2020-01-16 01:07:49 +02:00
parent ab486eb229
commit 2375a40b29
3 changed files with 8 additions and 5 deletions

View File

@ -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);

View File

@ -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];
}

View File

@ -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);
}