@@ -234,16 +234,16 @@ private void RenderCore()
234234 {
235235 D2D . ID2D1RenderTarget renderTarget = d2D1RenderTarget ;
236236
237- renderTarget . BeginDraw ( ) ;
237+ // renderTarget.BeginDraw();
238238
239- renderTarget . Clear ( Colors . White ) ;
239+ // renderTarget.Clear(Colors.White);
240240
241- var position = _position ;
241+ // var position = _position;
242242
243- var rectangleSize = 50 ;
244- renderTarget . FillRectangle ( new Rect ( ( float ) position . X , ( float ) position . Y , rectangleSize , rectangleSize ) , brush ) ;
243+ // var rectangleSize = 50;
244+ // renderTarget.FillRectangle(new Rect((float) position.X, (float) position.Y, rectangleSize, rectangleSize), brush);
245245
246- renderTarget . EndDraw ( ) ;
246+ // renderTarget.EndDraw();
247247 }
248248
249249 using ( StepPerformanceCounter . RenderThreadCounter . StepStart ( "SwapChain" ) )
@@ -328,7 +328,7 @@ out ID3D11DeviceContext d3D11DeviceContext
328328 Scaling = Scaling . Stretch ,
329329 SwapEffect = SwapEffect . FlipSequential , // 使用 FlipSequential 配合 Composition
330330 AlphaMode = AlphaMode . Ignore ,
331- Flags = SwapChainFlags . FrameLatencyWaitableObject , // 核心设置
331+ // Flags = SwapChainFlags.FrameLatencyWaitableObject, // 核心设置
332332 } ;
333333
334334 var fullscreenDescription = new SwapChainFullscreenDescription ( )
@@ -340,9 +340,9 @@ out ID3D11DeviceContext d3D11DeviceContext
340340 IDXGISwapChain2 swapChain2 = swapChain1 . QueryInterface < IDXGISwapChain2 > ( ) ;
341341 swapChain1 . Dispose ( ) ;
342342
343- swapChain2 . MaximumFrameLatency = 1 ;
344- var waitableObject = swapChain2 . FrameLatencyWaitableObject ;
345- _ = waitableObject ;
343+ // swapChain2.MaximumFrameLatency = 1;
344+ // var waitableObject = swapChain2.FrameLatencyWaitableObject;
345+ // _ = waitableObject;
346346 // 可以通过 WaitForSingleObjectEx 进行等待
347347
348348 // 不要被按下 alt+enter 进入全屏
0 commit comments