Exemple #1
0
 public PrimeEngine(RayFormat rayFormat, RayHitType hitType, RTPBufferType bufferType = RTPBufferType.Host, bool useCPU = false)
 {
     _rayFormat  = rayFormat;
     _hitType    = hitType;
     _bufferType = bufferType;
     _context    = new PrimeContext(!useCPU);
 }
Exemple #2
0
        public PrimeBuffer CreateBuffer <T>(RTPBufferType type, RtpBufferFormat format, T[] data)
            where T : struct
        {
            var desc = new PrimeBufferDesc {
                Type = type, Format = format
            };
            var buffer = PrimeBuffer.Create(this, desc, data);

            _buffers.Add(buffer);
            return(buffer);
        }