tinygi
diff src/tinygi.h @ 2:72752a1b3dbe
images and shapes
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 21 Jul 2015 04:30:00 +0300 |
parents | bc64090fe3d1 |
children |
line diff
1.1 --- a/src/tinygi.h Mon Jul 20 04:38:53 2015 +0300 1.2 +++ b/src/tinygi.h Tue Jul 21 04:30:00 2015 +0300 1.3 @@ -1,8 +1,6 @@ 1.4 #ifndef TINYGI_H_ 1.5 #define TINYGI_H_ 1.6 1.7 -struct tgi_vec3 { float x, y, z; }; 1.8 - 1.9 struct tinygi; 1.10 struct tgi_object; 1.11 struct tgi_shape; 1.12 @@ -32,8 +30,6 @@ 1.13 void tgi_destroy_object(struct tgi_object *o); 1.14 /* object takes ownership of the shape */ 1.15 void tgi_set_object_shape(struct tgi_object *o, struct tgi_shape *s); 1.16 -/* object takes ownership of the material */ 1.17 -void tgi_set_object_mtl(struct tgi_object *o, struct tgi_material *m); 1.18 1.19 /* mat should point to an array of 16 floats (4x4 homogeneous transformation matrix) */ 1.20 void tgi_load_matrix(struct tgi_object *o, const float *mat); 1.21 @@ -45,9 +41,14 @@ 1.22 void tgi_lookat(struct tgi_object *o, float x, float y, float z, 1.23 float tx, float ty, float tz, float ux, float uy, float uz); 1.24 1.25 -/* materials */ 1.26 -struct tgi_material *tgi_create_material(void); 1.27 -void tgi_destroy_material(struct tgi_material *mtl); 1.28 -/* TODO */ 1.29 +/* rendering */ 1.30 +float *tgi_begin(struct tinygi *tgi, int width, int height); 1.31 +float *tgi_expose(struct tinygi *tgi, float gamma); 1.32 + 1.33 +void tgi_render_frame(struct tinygi *tgi, int num_samples); 1.34 +void tgi_render(struct tinygi *tgi, int sample_idx); 1.35 +void tgi_render_rect(struct tinygi *tgi, int x, int y, int xsz, int ysz, int sample_idx); 1.36 + 1.37 + 1.38 1.39 #endif /* TINYGI_H_ */