rendlib/include/object.h

39 lines
692 B
C
Raw 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;
float mass;
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);
struct object *create_object(struct object **o, float mass, struct model *model);
#endif