X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Frend.h;h=33c5963e2b6624cef010a2bb2a161c1be77387d8;hb=81dffafe4b045c854d8a97f9c6c41877ee7669ca;hp=7508de43371747c0da6f444b4db03fe0bd6d665d;hpb=a8b3d0279566b8a49ea64d7e9e3dfa958364e347;p=retroray diff --git a/src/rend.h b/src/rend.h index 7508de4..33c5963 100644 --- a/src/rend.h +++ b/src/rend.h @@ -18,14 +18,27 @@ along with this program. If not, see . #ifndef REND_H_ #define REND_H_ +#include "cgmath/cgmath.h" +#include "geom.h" #include "sizeint.h" #include "imago2.h" extern struct img_pixmap renderbuf; +extern int max_ray_depth; +extern cgm_vec3 ambient; + +struct scene; int rend_init(void); void rend_size(int xsz, int ysz); +void rend_pan(int xoffs, int yoffs); void rend_begin(int x, int y, int w, int h); int render(uint32_t *fb); +int ray_trace(const cgm_ray *ray, int maxiter, cgm_vec3 *res); + +cgm_vec3 bgcolor(const cgm_ray *ray); +cgm_vec3 shade(const cgm_ray *ray, const struct rayhit *hit, int maxiter); + + #endif /* REND_H_ */