Hi I am new to OpenCL and have many problems writing OpenCL kernels.

I have a struct defined as:
Code :
typedef struct World {
	Camera camera;
	Light *lights;
	Sphere *spheres;
} World;
where Light and Sphere are another 2 structs which contains cl_float4 type, i tried to define a struct in the kernel as:
Code :
			"typedef struct {\n"
			"	Camera camera;\n"
			"	Light *lights;\n"
			"	Sphere *spheres;\n"
			"} World;\n"

However, when I pass my memory object to the kernel, all the values in the lights and spheres are 0, the value in camera is correct.