private void PlatformConstruct(GraphicsDevice graphicsDevice, int width, int height, bool mipMap, DepthFormat preferredDepthFormat, int preferredMultiSampleCount, RenderTargetUsage usage, bool shared) { _msSampleDescription = GraphicsDevice.GetSupportedSampleDescription( SharpDXHelper.ToFormat(Format), MultiSampleCount); GenerateIfRequired(); }
public SwapChainRenderTarget( GraphicsDevice graphicsDevice, IntPtr windowHandle, int width, int height, bool mipMap, SurfaceFormat surfaceFormat, DepthFormat depthFormat, int preferredMultiSampleCount, RenderTargetUsage usage, PresentInterval presentInterval) : base(graphicsDevice, width, height, mipMap, surfaceFormat, depthFormat, preferredMultiSampleCount, usage, SurfaceType.SwapChainRenderTarget) { var dxgiFormat = surfaceFormat == SurfaceFormat.Rgba32 ? SharpDX.DXGI.Format.B8G8R8A8_UNorm : SharpDXHelper.ToFormat(surfaceFormat); var multisampleDesc = GraphicsDevice.GetSupportedSampleDescription(dxgiFormat, MultiSampleCount); _windowHandle = windowHandle; PresentInterval = presentInterval; SwapChainRenderTargetConstruct(depthFormat, ref dxgiFormat, ref multisampleDesc); }