InitBuffer() 개인적인 메소드

private InitBuffer ( ComputeBuffer buf, int count, int stride, ComputeBufferType type ) : void
buf ComputeBuffer
count int
stride int
type ComputeBufferType
리턴 void
예제 #1
0
 public ComputeBuffer(int count, int stride, ComputeBufferType type)
 {
     if (count <= 0)
     {
         throw new ArgumentException("Attempting to create a zero length compute buffer", "count");
     }
     if (stride < 0)
     {
         throw new ArgumentException("Attempting to create a compute buffer with a negative stride", "stride");
     }
     this.m_Ptr = IntPtr.Zero;
     ComputeBuffer.InitBuffer(this, count, stride, type);
 }
예제 #2
0
        internal ComputeBuffer(int count, int stride, ComputeBufferType type, ComputeBufferMode usage, int stackDepth)
        {
            bool flag = count <= 0;

            if (flag)
            {
                throw new ArgumentException("Attempting to create a zero length compute buffer", "count");
            }
            bool flag2 = stride <= 0;

            if (flag2)
            {
                throw new ArgumentException("Attempting to create a compute buffer with a negative or null stride", "stride");
            }
            this.m_Ptr = ComputeBuffer.InitBuffer(count, stride, type, usage);
            this.SaveCallstack(stackDepth);
        }
예제 #3
0
 public ComputeBuffer(int count, int stride, ComputeBufferType type)
 {
     this.m_Ptr = IntPtr.Zero;
     ComputeBuffer.InitBuffer(this, count, stride, type);
 }