prosperon/source/engine/3d/mesh.h

21 lines
530 B
C
Raw Normal View History

2021-11-30 21:29:18 -06:00
#ifndef MESH_H
#define MESH_H
2023-05-12 13:22:05 -05:00
#include "sokol/sokol_gfx.h"
2021-11-30 21:29:18 -06:00
#include <stdint.h>
2022-11-19 17:13:57 -06:00
struct shader;
2021-11-30 21:29:18 -06:00
struct Texture;
2022-11-19 17:13:57 -06:00
struct mesh {
2023-05-12 13:22:05 -05:00
sg_bindings bind;
uint32_t face_count;
2021-11-30 21:29:18 -06:00
};
2023-05-12 13:22:05 -05:00
struct mesh *MakeMesh(struct Vertex *vertices, struct Vertex *ve, uint32_t *indices, uint32_t *ie, struct Texture *textures, struct Texture *te);
void setupmesh(struct mesh *mesh); /* Loads mesh into the GPU */
2022-11-19 17:13:57 -06:00
void DrawMesh(struct mesh *mesh, struct shader *shader);
2023-05-12 13:22:05 -05:00
void DrawMeshAgain(struct mesh *mesh); /* Draws whatever mesh was drawn last */
2021-11-30 21:29:18 -06:00
#endif