rendlib/include/object.h

38 lines
664 B
C
Raw Permalink Normal View History

#ifndef OBJECT_H
#define OBJECT_H
#include <cglm/cglm.h>
#define MAX_PATHS 2000
struct model {
float *vertices;
unsigned int *indices;
float *normals;
long vertices_num;
long indices_num;
long normals_num;
};
struct object {
vec4 translation_force;
vec4 position;
vec3 color;
void *next;
struct model *model;
float scale;
2024-10-08 17:43:14 +00:00
unsigned int vao;
unsigned int vbo; // vertices
unsigned int ebo; // indices
unsigned int nbo; // normals
};
struct model *load_model(const char *path);
int record_path(struct object *obj);
2024-10-14 20:40:35 +00:00
struct object *create_object(struct object **o, struct model *model);
#endif