-
Notifications
You must be signed in to change notification settings - Fork 0
/
CLTypes.h
64 lines (56 loc) · 1.05 KB
/
CLTypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#pragma once
#include "OpenCL.h"
#pragma pack(push,1)
struct cl_RGB32
{
cl_uchar CL_ALIGNED(4) s[4];
}; // 4 bytes
struct cl_Material
{
cl_float3 ambient;
cl_float3 diffuse;
cl_float3 specular;
cl_float shininess;
cl_float glossiness;
cl_float reflectivity;
cl_float transparency;
}; // 64 bytes
struct cl_AAInfo
{
cl_short lvl;
cl_short dim;
cl_float inc;
cl_float div;
}; // 16 bytes
struct cl_CamInfo {
cl_double3 bl_ray;
cl_double3 cam_pos;
cl_double3 cam_ori;
cl_double3 cam_fwd;
cl_double3 cam_rgt;
cl_double3 cam_up;
cl_double cam_foc;
cl_double cam_apt;
}; // 208 bytes
struct cl_RenderInfo
{
cl_CamInfo cam_info;
cl_float d_time;
cl_uint span_X;
cl_uint span_Y;
cl_uint pixels_X;
cl_uint pixels_Y;
cl_uint half_X;
cl_uint half_Y;
cl_uint rand_int;
cl_uint particles;
cl_AAInfo aa_info;
}; // 256 bytes
typedef struct {
cl_double3 new_pos;
cl_double3 position;
cl_double3 velocity;
cl_float mass;
cl_float radius;
} cl_Particle; // 104 bytes
#pragma pack(pop)