Changeset 471
- Timestamp:
- Apr 9, 2015, 8:55:27 PM (10 years ago)
- Location:
- GraphicTest
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/GraphicTest.lpr
r470 r471 10 10 Forms, lazopenglcontext, UMainForm, UPlatform, UDrawMethod, UFastBitmap, 11 11 UDrawForm, bgrabitmappack, 12 {$IFDEF WINDOWS}GR32_L,{$ENDIF}12 {$IFDEF GRAPHICS32}GR32_L,{$ENDIF} 13 13 UCanvasPixels, UCanvasPixelsUpdateLock, 14 14 ULazIntfImageColorsCopy, ULazIntfImageColorsNoCopy, UBGRABitmapPaintBox, -
GraphicTest/Methods/UGraphics32Method.pas
r470 r471 7 7 uses 8 8 Classes, SysUtils, UFastBitmap, UDrawMethod, 9 {$IFDEF WINDOWS}GR32, GR32_Image,{$ENDIF}9 {$IFDEF GRAPHICS32}GR32, GR32_Image,{$ENDIF} 10 10 Controls, Graphics; 11 11 12 {$IFDEF WINDOWS}12 {$IFDEF GRAPHICS32} 13 13 type 14 14 { TGraphics32Method } … … 26 26 implementation 27 27 28 {$IFDEF WINDOWS}28 {$IFDEF GRAPHICS32} 29 29 { TGraphics32Method } 30 30 -
GraphicTest/Methods/UOpenGLMethod.pas
r459 r471 7 7 uses 8 8 Classes, SysUtils, UDrawMethod, UFastBitmap 9 {$IFDEF opengl}, GL, GLExt, OpenGLContext{$ENDIF};9 {$IFDEF OPENGL}, GL, GLExt, OpenGLContext{$ENDIF}; 10 10 11 {$IFDEF opengl}11 {$IFDEF OPENGL} 12 12 type 13 13 { TOpenGLMethod } … … 23 23 implementation 24 24 25 {$IFDEF opengl}25 {$IFDEF OPENGL} 26 26 { TOpenGLMethod } 27 27 -
GraphicTest/Methods/UOpenGLPBOMethod.pas
r459 r471 7 7 uses 8 8 Classes, SysUtils, UDrawMethod, UFastBitmap, Controls, Graphics 9 {$IFDEF opengl}, GL, GLExt, OpenGLContext{$ENDIF};9 {$IFDEF OPENGL}, GL, GLExt, OpenGLContext{$ENDIF}; 10 10 11 {$IFDEF opengl}11 {$IFDEF OPENGL} 12 12 type 13 13 { TOpenGLPBOMethod } … … 26 26 implementation 27 27 28 {$IFDEF opengl}28 {$IFDEF OPENGL} 29 29 { TOpenGLPBOMethod } 30 30 -
GraphicTest/UDrawMethod.pas
r459 r471 8 8 Classes, SysUtils, ExtCtrls, UPlatform, UFastBitmap, Graphics, Controls, 9 9 LCLType, IntfGraphics, fpImage, GraphType, DateUtils, 10 LclIntf{$IFDEF opengl}, GL, GLExt, OpenGLContext{$ENDIF}; 10 {$IFDEF OPENGL}GL, GLExt, OpenGLContext,{$ENDIF} 11 LclIntf; 11 12 12 13 type … … 60 61 end; 61 62 62 {$IFDEF opengl}63 {$IFDEF OPENGL} 63 64 64 65 { TDrawMethodOpenGL } … … 123 124 124 125 125 {$IFDEF opengl}126 {$IFDEF OPENGL} 126 127 127 128 { TDrawMethodOpenGL } -
GraphicTest/UMainForm.pas
r470 r471 91 91 TestTerminated: Boolean; 92 92 TestTimeout: Real; 93 DrawMethodClasses: array of TDrawMethodClass; 93 94 procedure GenerateSceneFrames; 94 95 procedure TestMethod(Method: TDrawMethod); … … 96 97 procedure UpdateInterface; 97 98 procedure UpdateFrameSize; 99 procedure RegisterDrawMethods; 100 procedure RegisterDrawMethod(MethodClass: TDrawMethodClass); 98 101 public 99 102 FrameSize: TPoint; … … 117 120 UOpenGLPBOMethod, UGraphics32Method; 118 121 119 const120 DrawMethodClasses: array[0..8{$IFDEF opengl}+2{$ENDIF}{$IFDEF gr32}+1{$ENDIF}] of TDrawMethodClass = (121 TCanvasPixels, TCanvasPixelsUpdateLock, TLazIntfImageColorsCopy,122 TLazIntfImageColorsNoCopy, TBitmapRawImageData, TBitmapRawImageDataPaintBox,123 TBitmapRawImageDataMove, TBGRABitmapPaintBox124 {$IFDEF gr32}, TGraphics32Method{$ENDIF}125 {$IFDEF opengl}, TOpenGLMethod, TOpenGLPBOMethod{$ENDIF}126 ,TDummyMethod);127 128 129 130 122 { TMainForm } 131 123 … … 141 133 Randomize; 142 134 135 RegisterDrawMethods; 143 136 DrawMethods := TObjectList.Create; 144 137 for I := 0 to High(DrawMethodClasses) do begin … … 400 393 end; 401 394 395 procedure TMainForm.RegisterDrawMethods; 396 begin 397 RegisterDrawMethod(TCanvasPixels); 398 RegisterDrawMethod(TCanvasPixelsUpdateLock); 399 RegisterDrawMethod(TLazIntfImageColorsCopy); 400 RegisterDrawMethod(TLazIntfImageColorsNoCopy); 401 RegisterDrawMethod(TBitmapRawImageData); 402 RegisterDrawMethod(TBitmapRawImageDataPaintBox); 403 RegisterDrawMethod(TBitmapRawImageDataMove); 404 RegisterDrawMethod(TBGRABitmapPaintBox); 405 {$IFDEF GRAPHICS32} 406 RegisterDrawMethod(TGraphics32Method); 407 {$ENDIF} 408 {$IFDEF OPENGL} 409 RegisterDrawMethod(TOpenGLMethod); 410 RegisterDrawMethod(TOpenGLPBOMethod); 411 {$ENDIF} 412 RegisterDrawMethod(TDummyMethod); 413 end; 414 415 procedure TMainForm.RegisterDrawMethod(MethodClass: TDrawMethodClass); 416 begin 417 SetLength(DrawMethodClasses, Length(DrawMethodClasses) + 1); 418 DrawMethodClasses[High(DrawMethodClasses)] := MethodClass; 419 end; 420 402 421 end. 403 422
Note:
See TracChangeset
for help on using the changeset viewer.