#ifndef OBJLOADER_H_INCLUDE #define OBJLOADER_H_INCLUDE /* モデルデータ */ typedef struct { float *vertices; int num_vertices; } model; /* OBJファイルの読み込み */ void load_obj(model *m, const char *file_name); #endif #include <stdio.h> #include <stdlib.h> #include "ObjLoader.h" /* 初期バッファサイズ */ #define DEF_BUF_SIZE 2 /* 浮動小数点数バッファ */ typedef struct { int buf_size; int current_index; float *buf; } float_buffer;