public Texture2DArrayView(Texture2D resource, ShaderResourceViewDescription.Texture2DArrayResource description) { _mipMapCount = description.MipLevels; _arraySize = description.ArraySize; _subresources = new Texture2D.Texture2DSubresource[description.MipLevels * description.ArraySize]; int counter = 0; for (int i = description.FirstArraySlice; i < description.FirstArraySlice + description.ArraySize; i++) for (int j = description.MostDetailedMip; j < description.MostDetailedMip + description.MipLevels; j++) _subresources[counter++] = resource.GetSubresource(i, j); }
public Texture2DArrayView(Texture2D resource, RenderTargetViewDescription.Texture2DArrayResource description) { _subresources = new Texture2D.Texture2DSubresource[description.ArraySize]; for (int i = description.FirstArraySlice; i < description.FirstArraySlice + description.ArraySize; i++) _subresources[i] = resource.GetSubresource(i, description.MipSlice); }
public Texture2DView(Texture2D resource, ShaderResourceViewDescription.Texture2DResource description) { _subresources = new Texture2D.Texture2DSubresource[description.MipLevels]; for (int i = description.MostDetailedMip; i < description.MostDetailedMip + description.MipLevels; i++) _subresources[i] = resource.GetSubresource(0, i); }
public Texture2DView(Texture2D resource, RenderTargetViewDescription.Texture2DResource description) { _subresource = resource.GetSubresource(0, description.MipSlice); }
public Texture2DView(Texture2D resource, DepthStencilViewDescription.Texture2DResource description) { _subresource = resource.GetSubresource(0, description.MipSlice); }