X-Git-Url: http://git.euphorik.ch/?p=GPU.git;a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F04_RayTracing%2Fmoo%2Fdevice%2FRayTracingDevice.h;fp=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F04_RayTracing%2Fmoo%2Fdevice%2FRayTracingDevice.h;h=350ba9c7cc3876e0dde71854e39d3bd33febccce;hp=1500c43f736987faa17b58e34954a718cb4b35da;hb=f8259dce248a4411c3bc64cecb9fc268c4fd81d6;hpb=d720146850389c8bbe75cb86e69d7e26629ff97f 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 1500c43..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,7 +1,26 @@ #ifndef RAY_TRACING_DEVICE_H #define RAY_TRACING_DEVICE_H -__global__ -void rayTracing(uchar4* ptrDevPixels, int w, int h, float t); +#include "ConstantMemoryLink.h" + +#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