Ejemplo n.º 1
0
        internal DepthStencilView(Device device, Resource resource, DepthStencilViewDescription?description)
            : base(device, resource)
        {
            switch (resource.ResourceType)
            {
            case ResourceType.Buffer:
                throw new ArgumentException("Invalid resource type for depth stencil view: " + resource.ResourceType);
            }

            _description = description.GetValueOrDefault(DepthStencilViewDescription.CreateDefault(resource));
            _innerView   = InnerResourceView.Create(resource, _description);
        }
Ejemplo n.º 2
0
 internal RenderTargetView(Device device, Resource resource, RenderTargetViewDescription?description)
     : base(device, resource)
 {
     _description = description.GetValueOrDefault(RenderTargetViewDescription.CreateDefault(resource));
     _innerView   = InnerResourceView.Create(resource, _description);
 }