ssol_draw.h (1654B)
1 /* Copyright (C) 2018-2026 |Meso|Star> (contact@meso-star.com) 2 * Copyright (C) 2016, 2018 CNRS 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 16 17 #ifndef SSOL_DRAW_H 18 #define SSOL_DRAW_H 19 20 #include "ssol.h" 21 #include <rsys/rsys.h> 22 23 /* Forward declarations */ 24 struct s3d_scene_view; 25 struct ssf_bsdf; 26 struct ssp_rng; 27 28 typedef void 29 (*pixel_shader_T) 30 (struct ssol_scene* scn, 31 const struct ssol_camera* cam, 32 struct s3d_scene_view* view, 33 const int ithread, /* Id of the thread invoking the function */ 34 const size_t pix_coords[2], /* Image space pixel coordinates */ 35 const float pix_sz[2], /* Normalized pixel size */ 36 const size_t nsamples, /* #samples per pixel */ 37 double pixel[3], /* Output pixel */ 38 void* ctx); /* User defined data */ 39 40 extern LOCAL_SYM res_T 41 draw 42 (struct ssol_scene* scn, 43 const struct ssol_camera* cam, 44 const size_t width, 45 const size_t height, 46 const size_t spp, 47 ssol_write_pixels_T writer, 48 void* writer_data, 49 pixel_shader_T pixel_shader, 50 void* pixel_shader_data); 51 52 #endif /* SSOL_DRAW_H */ 53