added vulkan device and queues creation
This commit is contained in:
parent
89edee7249
commit
6c31a3ce27
20 changed files with 253 additions and 18 deletions
|
|
@ -1,18 +1,30 @@
|
|||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
#include "../rendering/renderer.h"
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "instance.h"
|
||||
#include "physical_device.h"
|
||||
#include "device.h"
|
||||
#include "vk.h"
|
||||
#include "../core/arena.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct renderer_context *renderer_context_init(void)
|
||||
{
|
||||
struct renderer_context *context = (struct renderer_context *) malloc(sizeof(struct renderer_context));
|
||||
struct renderer_context *context = (struct renderer_context *) arena_alloc(global_arena, (sizeof(struct renderer_context)));
|
||||
|
||||
vk_instance_init(context);
|
||||
vk_physical_device_pick(context);
|
||||
vk_physical_device_select_family_indices(context);
|
||||
vk_device_init(context);
|
||||
return context;
|
||||
}
|
||||
|
||||
void renderer_context_deinit(struct renderer_context *context)
|
||||
{
|
||||
vk_device_deinit(context);
|
||||
vk_instance_deinit(context);
|
||||
}
|
||||
|
||||
struct mesh *renderer_build_chunk_mesh(void)
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue