Add MVP projection passed through push constant
This commit is contained in:
1 parent
c770895217
commit
3d10fe76ce
4 files changed
+103
-12
No files matched your search
@@ -6,10 +6,21 @@
|
||||
|
||||
#define SWAPCHAIN_IMG_BUFFER_SIZE 4
|
||||
|
||||
typedef float vec2_t[3];
|
||||
typedef float vec3_t[3];
|
||||
typedef float mat4_t[16];
|
||||
|
||||
typedef struct {
|
||||
float position[2], colour[3];
|
||||
vec2_t position;
|
||||
vec3_t colour;
|
||||
} vertex_t;
|
||||
|
||||
typedef struct {
|
||||
mat4_t model;
|
||||
mat4_t view;
|
||||
mat4_t proj;
|
||||
} mvp_t;
|
||||
|
||||
typedef struct {
|
||||
VkInstance inst;
|
||||
VkSurfaceKHR surface;
|
||||
@@ -49,6 +60,6 @@ typedef struct {
|
||||
|
||||
void gpu_init(gpu_ctx_t *ctx, const gpu_config_t *config);
|
||||
void gpu_cleanup(const gpu_ctx_t *ctx);
|
||||
void gpu_render(const gpu_ctx_t *ctx);
|
||||
void gpu_render(const gpu_ctx_t *ctx, const mvp_t *mvp);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user