Cleanup to the macOS platform layer.
This commit is contained in:
parent
1ab40ff5b9
commit
93494bd398
|
@ -326,8 +326,6 @@ metal__make_buffer(u32 size, id<MTLDevice> device){
|
||||||
|
|
||||||
u32 vertex_buffer_size = (all_vertex_count * sizeof(Render_Vertex));
|
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
|
// NOTE(yuval): Find & Get a vertex buffer matching the required size
|
||||||
Metal_Buffer *buffer = [self get_reusable_buffer_with_size:vertex_buffer_size];
|
Metal_Buffer *buffer = [self get_reusable_buffer_with_size:vertex_buffer_size];
|
||||||
|
|
||||||
|
@ -341,8 +339,6 @@ metal__make_buffer(u32 size, id<MTLDevice> device){
|
||||||
length:sizeof(proj)
|
length:sizeof(proj)
|
||||||
atIndex:1];
|
atIndex:1];
|
||||||
|
|
||||||
u32 group_count = 0;
|
|
||||||
|
|
||||||
u32 buffer_offset = 0;
|
u32 buffer_offset = 0;
|
||||||
for (Render_Group *group = _target->group_first;
|
for (Render_Group *group = _target->group_first;
|
||||||
group;
|
group;
|
||||||
|
@ -409,12 +405,8 @@ metal__make_buffer(u32 size, id<MTLDevice> device){
|
||||||
|
|
||||||
buffer_offset += (vertex_count * sizeof(Render_Vertex));
|
buffer_offset += (vertex_count * sizeof(Render_Vertex));
|
||||||
}
|
}
|
||||||
|
|
||||||
++group_count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Group Count: %u\n", group_count);
|
|
||||||
|
|
||||||
[render_encoder endEncoding];
|
[render_encoder endEncoding];
|
||||||
|
|
||||||
// NOTE(yuval): Schedule a present once the framebuffer is complete using the current drawable
|
// NOTE(yuval): Schedule a present once the framebuffer is complete using the current drawable
|
||||||
|
|
|
@ -1286,7 +1286,7 @@ main(int arg_count, char **args){
|
||||||
[mac_vars.window makeKeyAndOrderFront:nil];
|
[mac_vars.window makeKeyAndOrderFront:nil];
|
||||||
|
|
||||||
// NOTE(yuval): Initialize the renderer
|
// 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);
|
mac_resize(w, h);
|
||||||
|
|
||||||
|
|
|
@ -87,8 +87,6 @@ struct Mac_OpenGL{
|
||||||
NSOpenGLPFAColorSize, 32,
|
NSOpenGLPFAColorSize, 32,
|
||||||
NSOpenGLPFAAlphaSize, 8,
|
NSOpenGLPFAAlphaSize, 8,
|
||||||
NSOpenGLPFADepthSize, 24,
|
NSOpenGLPFADepthSize, 24,
|
||||||
NSOpenGLPFASampleBuffers, 1,
|
|
||||||
NSOpenGLPFASamples, 16,
|
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue