#ifndef SRENDER_H #define SRENDER_H #ifdef __cplusplus extern "C" { #endif #include "vectorial/simd4x4f.h" typedef struct srndr srndr; typedef struct srview srview; typedef struct srcmdbuf srcmdbuf; typedef enum { SRndrCmdTypeFrame = 0, SRndrCmdTypeGrid, SRndrCmdTypeBox, SRndrCmdTypeLight, SRndrCmdTypeSphere } SRndrCmdType; typedef struct srcmd { simd4x4f mat; simd4f color; SRndrCmdType type; } srcmd; // // Renderer // srndr* srndr_create(); void srndr_destroy(srndr* sr); // // View // srview* srview_create(); void srview_destroy(srview* sv); void srview_set_proj(srview* sv, simd4x4f proj); void srview_set_view(srview* sv, simd4x4f view); void srview_set_size(srview* sv, int width, int height); void srview_get_output_texture(srview* sv, GLuint* texture); // // Command Buffer and Commands // srcmdbuf* srcmdbuf_create(unsigned int size_max); void srcmdbuf_clear (srcmdbuf* cmdbuf); srcmd* srcmd_create(srcmdbuf* cmdbuf); void srndr_render(srndr* srndr, srview* sview, srcmdbuf* scmdbuf); #ifdef __cplusplus } #endif #endif