projects
/
retroray
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
first render
[retroray]
/
src
/
rend.h
diff --git
a/src/rend.h
b/src/rend.h
index
7508de4
..
33c5963
100644
(file)
--- a/
src/rend.h
+++ b/
src/rend.h
@@
-18,14
+18,27
@@
along with this program. If not, see <https://www.gnu.org/licenses/>.
#ifndef REND_H_
#define REND_H_
#ifndef REND_H_
#define REND_H_
+#include "cgmath/cgmath.h"
+#include "geom.h"
#include "sizeint.h"
#include "imago2.h"
extern struct img_pixmap renderbuf;
#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);
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);
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_ */
#endif /* REND_H_ */