From 93494bd3984c1675bf3c33b936404208e5ac16d6 Mon Sep 17 00:00:00 2001 From: Yuval Dolev Date: Tue, 14 Jan 2020 17:25:13 +0200 Subject: [PATCH] Cleanup to the macOS platform layer. --- metal/4ed_metal_render.mm | 8 -------- platform_mac/mac_4ed.mm | 2 +- platform_mac/mac_4ed_opengl.mm | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/metal/4ed_metal_render.mm b/metal/4ed_metal_render.mm index 7ac6f35e..6f029cc7 100644 --- a/metal/4ed_metal_render.mm +++ b/metal/4ed_metal_render.mm @@ -326,8 +326,6 @@ metal__make_buffer(u32 size, id device){ u32 vertex_buffer_size = (all_vertex_count * sizeof(Render_Vertex)); - printf("Vertices to render: %d\n", all_vertex_count); - // NOTE(yuval): Find & Get a vertex buffer matching the required size Metal_Buffer *buffer = [self get_reusable_buffer_with_size:vertex_buffer_size]; @@ -341,8 +339,6 @@ metal__make_buffer(u32 size, id device){ length:sizeof(proj) atIndex:1]; - u32 group_count = 0; - u32 buffer_offset = 0; for (Render_Group *group = _target->group_first; group; @@ -409,12 +405,8 @@ metal__make_buffer(u32 size, id device){ buffer_offset += (vertex_count * sizeof(Render_Vertex)); } - - ++group_count; } - printf("Group Count: %u\n", group_count); - [render_encoder endEncoding]; // NOTE(yuval): Schedule a present once the framebuffer is complete using the current drawable diff --git a/platform_mac/mac_4ed.mm b/platform_mac/mac_4ed.mm index 0925f962..2318c698 100644 --- a/platform_mac/mac_4ed.mm +++ b/platform_mac/mac_4ed.mm @@ -1286,7 +1286,7 @@ main(int arg_count, char **args){ [mac_vars.window makeKeyAndOrderFront:nil]; // NOTE(yuval): Initialize the renderer - renderer = mac_init_renderer(MacRenderer_Metal, mac_vars.window, &target); + renderer = mac_init_renderer(MacRenderer_OpenGL, mac_vars.window, &target); mac_resize(w, h); diff --git a/platform_mac/mac_4ed_opengl.mm b/platform_mac/mac_4ed_opengl.mm index 57dd3348..7efb31c0 100644 --- a/platform_mac/mac_4ed_opengl.mm +++ b/platform_mac/mac_4ed_opengl.mm @@ -87,8 +87,6 @@ struct Mac_OpenGL{ NSOpenGLPFAColorSize, 32, NSOpenGLPFAAlphaSize, 8, NSOpenGLPFADepthSize, 24, - NSOpenGLPFASampleBuffers, 1, - NSOpenGLPFASamples, 16, 0 };