2 * This program is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 * Copyright (C) 2010 Pavel Herrmann (morpheus.ibis@gmail.com)
23 #ifndef __OPENCL_VERSION__
25 #include <CL/cl_platform.h>
26 typedef cl_float3 float3
;
27 typedef cl_float2 float2
;
36 float3 spaceCoords
[3];
37 float3 normalCoords
[3];
38 float2 textureCoords
[3];
42 typedef struct triangle_s triangle_t
;
56 unsigned int randomSeed
;
64 struct reconstruct_s reconstructInfo
;
67 typedef struct ray_s ray_t
;
74 struct reconstruct_s reconstructInfo
;
77 typedef struct hit_s hit_t
;
81 #ifdef __OPENCL_VERSION__
88 typedef struct dummyaccel_s dummyaccel_t
;
98 typedef struct gridinfo_s gridinfo_t
;
102 #ifdef __OPENCL_VERSION__
103 __global
const struct gridinfo_s
* gridinfo
;
104 __global
const int * grid
;
105 __global
const int * cells
;
113 typedef struct gridaccel_s gridaccel_t
;
120 struct dummyaccel_s dummy
;
121 struct gridaccel_s grid
;
125 #define ACCEL_DUMMY 0
128 typedef struct accel_s accel_t
;
133 unsigned char * data
;
138 typedef struct texinfo_s texinfo_t
;
147 typedef struct mtl_def_s mtl_def_t
;
154 struct directional_light_s
175 struct omni_light_s omni
;
176 struct directional_light_s directional
;
177 struct spot_light_s spot
;
181 #define LIGHT_AMBIENT 0
183 #define LIGHT_DIRECTIONAL 2
186 typedef struct light_s light_t
;
188 struct light_sample_s
195 typedef struct light_sample_s light_sample_t
;