public MyComputeBufferId AddComputeBufferTemplate(MyComputeBufferTemplate template)
        {
            var bufferId = new MyComputeBufferId()
            {
                Id = _lastBufferId++
            };

            _computeBufferTemplates[bufferId] = template;
            return(bufferId);
        }
        public MyComputeBufferId AddExistingComputeBuffer(ComputeBuffer buffer)
        {
            var bufferId = new MyComputeBufferId()
            {
                Id = _lastBufferId++
            };

            _arleadyCreatedComputeBufferTemplates[bufferId] = buffer;
            return(bufferId);
        }
Exemple #3
0
 public void SetBuffer(string bufferName, MyComputeBufferId bufferId, List <MyKernelHandle> kernelHandles)
 {
     _parametersUsageContainer.AddBuffer(bufferName, bufferId, kernelHandles);
 }
 public ComputeBuffer RetriveBuffer(MyComputeBufferId id)
 {
     Preconditions.Assert(_buffers.ContainsKey(id), " There is no buffer of given id ");
     return(_buffers[id]);
 }
 public void AddBuffer(MyComputeBufferId id, ComputeBuffer buffer)
 {
     _buffers[id] = buffer;
 }
Exemple #6
0
 public void AddBuffer(string bufferName, MyComputeBufferId bufferId, List <MyKernelHandle> handles)
 {
     _bufferUsages.Add(new MyComputeBufferUsageTemplate(bufferName, bufferId, handles));
 }
Exemple #7
0
 public bool IsRequestedBufferId(MyComputeBufferId id)
 {
     return(_requestedBufferIds.Contains(id));
 }
Exemple #8
0
 public void AddBuffer(MyComputeBufferId id, ComputeBuffer buffer)
 {
     Preconditions.Assert(_requestedBufferIds.Contains(id), "Passed id if not requested");
     _createdBuffers.Add(id, buffer);
 }