public static ResourceGroupLayout New <T>(GraphicsDevice graphicsDevice, ResourceGroupDescription resourceGroupDescription, EffectBytecode effectBytecode) where T : ResourceGroupLayout, new() { var result = new T { DescriptorSetLayoutBuilder = resourceGroupDescription.DescriptorSetLayout, DescriptorSetLayout = DescriptorSetLayout.New(graphicsDevice, resourceGroupDescription.DescriptorSetLayout), ConstantBufferReflection = resourceGroupDescription.ConstantBufferReflection, Hash = resourceGroupDescription.Hash, }; if (result.ConstantBufferReflection != null) { result.ConstantBufferSize = result.ConstantBufferReflection.Size; result.ConstantBufferHash = result.ConstantBufferReflection.Hash; } return(result); }
public static ResourceGroupLayout New(GraphicsDevice graphicsDevice, ResourceGroupDescription resourceGroupDescription, EffectBytecode effectBytecode) { return(New <ResourceGroupLayout>(graphicsDevice, resourceGroupDescription, effectBytecode)); }