X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F04_RayTracing%2Fmoo%2Fdevice%2FRayTracingDevice.h;h=350ba9c7cc3876e0dde71854e39d3bd33febccce;hb=f8259dce248a4411c3bc64cecb9fc268c4fd81d6;hp=47e93ae94682dae2bc1721526fba643046b6147c;hpb=ebdad7dc732d4742d09fd72d312175cb07d27a59;p=GPU.git diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/RayTracingDevice.h b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/RayTracingDevice.h index 47e93ae..350ba9c 100644 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/RayTracingDevice.h +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/RayTracingDevice.h @@ -1,9 +1,26 @@ #ifndef RAY_TRACING_DEVICE_H #define RAY_TRACING_DEVICE_H -#include "DomaineMath.h" +#include "ConstantMemoryLink.h" -__global__ -void rayTracing(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, float t); +#include "Sphere.h" +#include "RayTracingCommon.h" + +#if CURRENT_MEMORY_MODEL == MEMORY_MODEL_GLOBAL or CURRENT_MEMORY_MODEL == MEMORY_MODEL_SHARED + + __global__ + void rayTracing(uchar4* ptrDevPixels, const Sphere* ptrDevSpheres, int w, int h, float t); + +#elif CURRENT_MEMORY_MODEL == MEMORY_MODEL_CONSTANT + + /** + * Accès à la mémoire constante contenant les sphères. + */ + ConstantMemoryLink constantMemorySpheresLink(); + + __global__ + void rayTracing(uchar4* ptrDevPixels, int w, int h, float t); + +#endif #endif