Changeset 319 for GraphicTest
- Timestamp:
- Feb 1, 2012, 3:50:43 PM (13 years ago)
- Location:
- GraphicTest
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/GraphicTest.lpi
r318 r319 41 41 <TopLine Value="1"/> 42 42 <CursorPos X="51" Y="15"/> 43 <UsageCount Value=" 59"/>43 <UsageCount Value="60"/> 44 44 </Unit0> 45 45 <Unit1> … … 52 52 <EditorIndex Value="0"/> 53 53 <WindowIndex Value="0"/> 54 <TopLine Value="1 98"/>55 <CursorPos X=" 79" Y="203"/>56 <UsageCount Value=" 59"/>54 <TopLine Value="114"/> 55 <CursorPos X="12" Y="120"/> 56 <UsageCount Value="60"/> 57 57 <Loaded Value="True"/> 58 58 <LoadedDesigner Value="True"/> … … 71 71 <TopLine Value="1"/> 72 72 <CursorPos X="1" Y="1"/> 73 <UsageCount Value=" 59"/>73 <UsageCount Value="60"/> 74 74 </Unit3> 75 75 <Unit4> … … 161 161 <EditorIndex Value="2"/> 162 162 <WindowIndex Value="0"/> 163 <TopLine Value="6 58"/>164 <CursorPos X="3" Y=" 662"/>165 <UsageCount Value="5 3"/>163 <TopLine Value="691"/> 164 <CursorPos X="3" Y="710"/> 165 <UsageCount Value="54"/> 166 166 <Loaded Value="True"/> 167 167 </Unit17> … … 174 174 <TopLine Value="15"/> 175 175 <CursorPos X="19" Y="25"/> 176 <UsageCount Value="5 3"/>176 <UsageCount Value="54"/> 177 177 <Loaded Value="True"/> 178 178 </Unit18> … … 455 455 <TopLine Value="403"/> 456 456 <CursorPos X="1" Y="416"/> 457 <UsageCount Value="1 1"/>457 <UsageCount Value="10"/> 458 458 </Unit59> 459 459 <Unit60> … … 462 462 <TopLine Value="90"/> 463 463 <CursorPos X="1" Y="103"/> 464 <UsageCount Value="1 1"/>464 <UsageCount Value="10"/> 465 465 </Unit60> 466 466 </Units> 467 <JumpHistory Count=" 30" HistoryIndex="27">467 <JumpHistory Count="29" HistoryIndex="28"> 468 468 <Position1> 469 469 <Filename Value="UMainForm.pas"/> 470 <Caret Line="1 99" Column="1" TopLine="184"/>470 <Caret Line="189" Column="82" TopLine="177"/> 471 471 </Position1> 472 472 <Position2> 473 473 <Filename Value="UMainForm.pas"/> 474 <Caret Line="1 56" Column="1" TopLine="143"/>474 <Caret Line="144" Column="43" TopLine="136"/> 475 475 </Position2> 476 476 <Position3> 477 477 <Filename Value="UMainForm.pas"/> 478 <Caret Line="18 9" Column="82" TopLine="177"/>478 <Caret Line="185" Column="20" TopLine="183"/> 479 479 </Position3> 480 480 <Position4> 481 481 <Filename Value="UMainForm.pas"/> 482 <Caret Line="1 44" Column="43" TopLine="136"/>482 <Caret Line="191" Column="3" TopLine="189"/> 483 483 </Position4> 484 484 <Position5> 485 485 <Filename Value="UMainForm.pas"/> 486 <Caret Line=" 185" Column="20" TopLine="183"/>486 <Caret Line="236" Column="58" TopLine="215"/> 487 487 </Position5> 488 488 <Position6> 489 489 <Filename Value="UMainForm.pas"/> 490 <Caret Line="1 91" Column="3" TopLine="189"/>490 <Caret Line="124" Column="14" TopLine="107"/> 491 491 </Position6> 492 492 <Position7> 493 493 <Filename Value="UMainForm.pas"/> 494 <Caret Line="2 36" Column="58" TopLine="215"/>494 <Caret Line="206" Column="19" TopLine="203"/> 495 495 </Position7> 496 496 <Position8> 497 497 <Filename Value="UMainForm.pas"/> 498 <Caret Line="1 24" Column="14" TopLine="107"/>498 <Caret Line="117" Column="3" TopLine="115"/> 499 499 </Position8> 500 500 <Position9> 501 501 <Filename Value="UMainForm.pas"/> 502 <Caret Line=" 206" Column="19" TopLine="203"/>502 <Caret Line="118" Column="1" TopLine="113"/> 503 503 </Position9> 504 504 <Position10> 505 505 <Filename Value="UMainForm.pas"/> 506 <Caret Line="11 7" Column="3" TopLine="115"/>506 <Caret Line="119" Column="1" TopLine="113"/> 507 507 </Position10> 508 508 <Position11> 509 509 <Filename Value="UMainForm.pas"/> 510 <Caret Line=" 118" Column="1" TopLine="113"/>510 <Caret Line="242" Column="1" TopLine="223"/> 511 511 </Position11> 512 512 <Position12> 513 513 <Filename Value="UMainForm.pas"/> 514 <Caret Line=" 119" Column="1" TopLine="113"/>514 <Caret Line="243" Column="1" TopLine="223"/> 515 515 </Position12> 516 516 <Position13> 517 517 <Filename Value="UMainForm.pas"/> 518 <Caret Line="24 2" Column="1" TopLine="223"/>518 <Caret Line="244" Column="1" TopLine="223"/> 519 519 </Position13> 520 520 <Position14> 521 521 <Filename Value="UMainForm.pas"/> 522 <Caret Line="24 3" Column="1" TopLine="223"/>522 <Caret Line="245" Column="1" TopLine="223"/> 523 523 </Position14> 524 524 <Position15> 525 525 <Filename Value="UMainForm.pas"/> 526 <Caret Line=" 244" Column="1" TopLine="223"/>526 <Caret Line="120" Column="1" TopLine="107"/> 527 527 </Position15> 528 528 <Position16> 529 529 <Filename Value="UMainForm.pas"/> 530 <Caret Line=" 245" Column="1" TopLine="223"/>530 <Caret Line="121" Column="1" TopLine="107"/> 531 531 </Position16> 532 532 <Position17> 533 533 <Filename Value="UMainForm.pas"/> 534 <Caret Line="12 0" Column="1" TopLine="107"/>534 <Caret Line="122" Column="1" TopLine="107"/> 535 535 </Position17> 536 536 <Position18> 537 537 <Filename Value="UMainForm.pas"/> 538 <Caret Line="12 1" Column="1" TopLine="107"/>538 <Caret Line="123" Column="1" TopLine="107"/> 539 539 </Position18> 540 540 <Position19> 541 541 <Filename Value="UMainForm.pas"/> 542 <Caret Line="12 2" Column="1" TopLine="107"/>542 <Caret Line="129" Column="37" TopLine="115"/> 543 543 </Position19> 544 544 <Position20> 545 545 <Filename Value="UMainForm.pas"/> 546 <Caret Line="1 23" Column="1" TopLine="107"/>546 <Caret Line="148" Column="3" TopLine="139"/> 547 547 </Position20> 548 548 <Position21> 549 549 <Filename Value="UMainForm.pas"/> 550 <Caret Line="1 29" Column="37" TopLine="115"/>550 <Caret Line="133" Column="32" TopLine="116"/> 551 551 </Position21> 552 552 <Position22> 553 553 <Filename Value="UMainForm.pas"/> 554 <Caret Line="1 48" Column="3" TopLine="139"/>554 <Caret Line="134" Column="32" TopLine="117"/> 555 555 </Position22> 556 556 <Position23> 557 <Filename Value="U MainForm.pas"/>558 <Caret Line="1 33" Column="32" TopLine="116"/>557 <Filename Value="UFastBitmap.pas"/> 558 <Caret Line="16" Column="14" TopLine="9"/> 559 559 </Position23> 560 560 <Position24> 561 <Filename Value="U MainForm.pas"/>562 <Caret Line=" 134" Column="32" TopLine="117"/>561 <Filename Value="UFastBitmap.pas"/> 562 <Caret Line="41" Column="3" TopLine="27"/> 563 563 </Position24> 564 564 <Position25> 565 565 <Filename Value="UFastBitmap.pas"/> 566 <Caret Line="1 6" Column="14" TopLine="9"/>566 <Caret Line="1" Column="1" TopLine="1"/> 567 567 </Position25> 568 568 <Position26> 569 569 <Filename Value="UFastBitmap.pas"/> 570 <Caret Line=" 41" Column="3" TopLine="27"/>570 <Caret Line="25" Column="24" TopLine="3"/> 571 571 </Position26> 572 572 <Position27> 573 <Filename Value="U FastBitmap.pas"/>574 <Caret Line="1 " Column="1" TopLine="1"/>573 <Filename Value="UMainForm.pas"/> 574 <Caret Line="160" Column="1" TopLine="143"/> 575 575 </Position27> 576 576 <Position28> 577 <Filename Value="U FastBitmap.pas"/>578 <Caret Line=" 25" Column="24" TopLine="3"/>577 <Filename Value="UMainForm.pas"/> 578 <Caret Line="162" Column="31" TopLine="143"/> 579 579 </Position28> 580 580 <Position29> 581 <Filename Value="U DrawMethod.pas"/>582 <Caret Line=" 662" Column="3" TopLine="658"/>581 <Filename Value="UMainForm.pas"/> 582 <Caret Line="138" Column="1" TopLine="118"/> 583 583 </Position29> 584 <Position30>585 <Filename Value="UFastBitmap.pas"/>586 <Caret Line="81" Column="4" TopLine="77"/>587 </Position30>588 584 </JumpHistory> 589 585 </ProjectOptions> -
GraphicTest/UDrawMethod.pas
r317 r319 26 26 Terminated: Boolean; 27 27 FrameDuration: TDateTime; 28 StepDuration: TDateTime; 28 29 PaintObject: TPaintObject; 29 30 OpenGLBitmap: Pointer; -
GraphicTest/UMainForm.lfm
r318 r319 18 18 Width = 348 19 19 ActivePage = TabSheet1 20 Anchors = [akTop, ak Left, akRight, akBottom]20 Anchors = [akTop, akRight, akBottom] 21 21 TabIndex = 0 22 22 TabOrder = 0 … … 54 54 Top = 8 55 55 Width = 368 56 Anchors = [akTop, akLeft, ak Bottom]56 Anchors = [akTop, akLeft, akRight, akBottom] 57 57 Columns = < 58 58 item … … 66 66 item 67 67 Caption = 'FPS' 68 Width = 75 69 end 70 item 71 Caption = 'Step duration [ms]' 72 Width = 80 73 end 74 item 75 Caption = 'Step FPS' 68 76 Width = 75 69 77 end> … … 97 105 end 98 106 object FloatSpinEdit1: TFloatSpinEdit 99 Left = 160107 Left = 88 100 108 Height = 21 101 109 Top = 392 … … 122 130 Height = 14 123 131 Top = 395 124 Width = 137132 Width = 70 125 133 Anchors = [akLeft, akBottom] 126 Caption = 'S ingle method testduration:'134 Caption = 'Step duration:' 127 135 ParentColor = False 128 136 end 129 137 object Label2: TLabel 130 Left = 224138 Left = 152 131 139 Height = 14 132 140 Top = 395 -
GraphicTest/UMainForm.pas
r318 r319 117 117 118 118 procedure TMainForm.ButtonSingleTestClick(Sender: TObject); 119 var 120 StepStartTime: TDateTime; 119 121 begin 120 122 try … … 129 131 Application.ProcessMessages; 130 132 repeat 133 StepStartTime := NowPrecise; 131 134 DrawFrameTiming(TFastBitmap(Scenes[SceneIndex])); 132 135 SceneIndex := (SceneIndex + 1) mod Scenes.Count; 133 136 Application.ProcessMessages; 137 StepDuration := NowPrecise - StepStartTime; 134 138 until not SingleTestActive; 135 139 end; … … 146 150 C: Integer; 147 151 StartTime: TDateTime; 152 StepStartTime: TDateTime; 148 153 begin 149 154 try … … 158 163 StartTime := NowPrecise; 159 164 repeat 165 StepStartTime := NowPrecise; 160 166 DrawFrameTiming(TFastBitmap(Scenes[SceneIndex])); 161 167 SceneIndex := (SceneIndex + 1) mod Scenes.Count; 162 168 Application.ProcessMessages; 169 StepDuration := NowPrecise - StepStartTime; 163 170 until ((NowPrecise - StartTime) > OneSecond * FloatSpinEdit1.Value) or not AllTestActive; 164 171 end; … … 204 211 if FrameDuration > 0 then 205 212 Item.SubItems.Add(FloatToStr(RoundTo(1 / (FrameDuration / OneSecond), -3))) 213 else Item.SubItems.Add('0'); 214 Item.SubItems.Add(FloatToStr(RoundTo(StepDuration / OneMillisecond, -3))); 215 if FrameDuration > 0 then 216 Item.SubItems.Add(FloatToStr(RoundTo(1 / (StepDuration / OneSecond), -3))) 206 217 else Item.SubItems.Add('0'); 207 218 end;
Note:
See TracChangeset
for help on using the changeset viewer.