Implement Utah teapot model loading
This commit is contained in:
1 parent
f546f27a42
commit
620cf7606b
8 files changed
+303
-48
No files matched your search
@@ -2,17 +2,13 @@
|
||||
#define GPU_H
|
||||
|
||||
#include "linear_alg.h"
|
||||
#include "model.h"
|
||||
|
||||
#define GLFW_INCLUDE_VULKAN
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#define SWAPCHAIN_IMG_BUFFER_SIZE 4
|
||||
|
||||
typedef struct {
|
||||
vec3_t position;
|
||||
vec3_t colour;
|
||||
} vertex_t;
|
||||
|
||||
typedef struct {
|
||||
mat4_t model;
|
||||
mat4_t view;
|
||||
@@ -53,13 +49,9 @@ typedef struct {
|
||||
typedef struct {
|
||||
const char *application_name;
|
||||
GLFWwindow *window;
|
||||
const vertex_t *vertex_data;
|
||||
size_t vertex_data_size;
|
||||
const uint16_t *index_data;
|
||||
size_t index_data_size;
|
||||
} gpu_config_t;
|
||||
|
||||
void gpu_init(gpu_ctx_t *ctx, const gpu_config_t *config);
|
||||
void gpu_init(gpu_ctx_t *ctx, const gpu_config_t *config, model_t model);
|
||||
void gpu_cleanup(const gpu_ctx_t *ctx);
|
||||
void gpu_render(const gpu_ctx_t *ctx, const mvp_t *mvp);
|
||||
|
||||
|
||||
Reference in new issue
Block a user