branch | pyrit |
changeset 20 | f22952603f29 |
parent 19 | 4e0955fca797 |
child 22 | 76b7bd51d64a |
19:4e0955fca797 | 20:f22952603f29 |
---|---|
33 cam.setEye(Vector3(0,0,15)); |
33 cam.setEye(Vector3(0,0,15)); |
34 rt.setCamera(&cam); |
34 rt.setCamera(&cam); |
35 |
35 |
36 int w = 800; |
36 int w = 800; |
37 int h = 600; |
37 int h = 600; |
38 float *fdata = rt.render(w, h); |
38 float *fdata = (float *) malloc(w*h*3*sizeof(float)); |
39 rt.render(w, h, fdata); |
|
39 |
40 |
40 struct image *img; |
41 struct image *img; |
41 new_image(&img, w, h, 3); |
42 new_image(&img, w, h, 3); |
42 |
43 |
43 float *fd = fdata; |
44 float *fd = fdata; |