Exemplo n.º 1
0
 /// <summary>
 /// Specialised constructor for use only by derived classes.
 /// </summary>
 /// <param name="device">The <see cref="GraphicsDevice" />.</param>
 /// <param name="texture">The texture.</param>
 protected internal Texture2DBase(GraphicsDevice device, Texture2DBase texture, ViewType viewType, int viewArraySlice, int viewMipLevel, PixelFormat viewFormat = PixelFormat.None)
     : base(device, texture, viewType, viewArraySlice, viewMipLevel, viewFormat)
 {
     // Copy the device child, but don't use NativeDeviceChild, as it is registering it for disposing.
     _nativeDeviceChild        = texture._nativeDeviceChild;
     NativeResource            = texture.NativeResource;
     NativeDescription         = texture.NativeDescription;
     NativeShaderResourceView  = GetShaderResourceView(viewType, viewArraySlice, viewMipLevel);
     NativeUnorderedAccessView = GetUnorderedAccessView(viewArraySlice, viewMipLevel);
     dxgiSurface = texture.dxgiSurface;
 }
Exemplo n.º 2
0
 protected internal Texture2DBase(GraphicsDevice device, Texture2DBase texture) : base(device, texture, ViewType.Full, 0, 0)
 {
     this.Target     = texture.Target;
     this.resourceId = texture.ResourceId;
 }
Exemplo n.º 3
0
 protected internal Texture2DBase(GraphicsDevice device, Texture2DBase texture)
     : base(device, texture.Description)
 {
 }
Exemplo n.º 4
0
 protected internal Texture2DBase(GraphicsDevice device, Texture2DBase texture) : base(device, texture, ViewType.Full, 0, 0)
 {
     this.Target = texture.Target;
     this.resourceId = texture.ResourceId;
 }
Exemplo n.º 5
0
 protected internal Texture2DBase(GraphicsDevice device, Texture2DBase texture)
     : base(device, texture.Description)
 {
 }