Exemplo n.º 1
0
        public void SetDescriptorSets(GLCmdDescriptorSetParameter ds)
        {
            var index = GetDescriptorSetIndex(ds.Bindpoint);

            mBoundDescriptorSets[index] = ds;

            BindDescriptorSets(ds);
        }
Exemplo n.º 2
0
        //private uint[] mDynamicOffsets;
        public void BindDescriptorSets(GLCmdDescriptorSetParameter param)
        {
            if (param != null)
            {
                var ds = param.DescriptorSet;

                if (ds != null && ds.IsValidDescriptorSet)
                {
                    uint index = 0U;
                    foreach (var resource in ds.Resources)
                    {
                        if (resource != null)
                        {
                            if (resource.GroupType == GLDescriptorBindingGroup.StorageBuffer)
                            {
                                index = BindStorageBuffer(ds, resource, param.DynamicOffsets, index);
                            }
                            else if (resource.GroupType == GLDescriptorBindingGroup.UniformBuffer)
                            {
                                index = BindUniformBuffer(ds, resource, param.DynamicOffsets, index);
                            }
                            else if (resource.GroupType == GLDescriptorBindingGroup.CombinedImageSampler)
                            {
                                BindCombinedSampler(ds, resource);
                            }
                        }
                    }
                }
                else
                {
                    ResetExistingUniformBuffers();
                }

                RebindAllUniformBuffers();
            }
        }
Exemplo n.º 3
0
 public void BindDescriptorSets(GLCmdDescriptorSetParameter ds)
 {
     mCache.SetDescriptorSets(ds);
 }