Exemple #1
0
        public static IntPtr CreateBindGroup(IntPtr bindGroupLayout, IntPtr _uRotBuf) // ResourceSet on wave
        {
            WGPUBindGroupEntry bgEntry = new WGPUBindGroupEntry
            {
                binding = 0,
                buffer  = _uRotBuf,
                offset  = 0,
                size    = sizeof(float) // sizeof(rotDeg)
            };

            WGPUBindGroupDescriptor bgDesc = new WGPUBindGroupDescriptor
            {
                layout     = bindGroupLayout,
                entryCount = 1,
                entries    = &bgEntry
            };

            return(WebGPUNative.wgpuDeviceCreateBindGroup(Device, &bgDesc));
        }