public static Create ( Format format, SampleDescription sampleDescription = null, int mipLevels = 1 ) : |
||
format | Format | |
sampleDescription | SampleDescription | |
mipLevels | int | |
return |
public static TargetResourceTexture Create(Format format, SampleDescription? sampleDescription = null, int mipLevels = 1) {
return new TargetResourceTexture(new Texture2DDescription {
MipLevels = mipLevels,
ArraySize = 1,
Format = format,
SampleDescription = sampleDescription ?? DefaultSampleDescription,
Usage = ResourceUsage.Default,
BindFlags = BindFlags.ShaderResource | BindFlags.RenderTarget,
CpuAccessFlags = CpuAccessFlags.None,
OptionFlags = ResourceOptionFlags.None
});
}
}