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=0c207d450ede3f8dd704029f808d5dd0fa5eacf1;hb=HEAD;hp=5e4487dac5d26d712c128613503ed4208bd0a4d5;hpb=f2c6a4fc79746e2d5c6678699bd2ca93ffc49bcc;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 5e4487d..0c207d4 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, float t); +#include "Sphere.h" +#include "RayTracingParams.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