CursorD.dpr 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. {: Displaying alpha-blended 2D bitmaps with GLScene.
  2. This sample is a very basic picture viewer, using OpenGL for displaying
  3. images and maintaining a cursor with alpha-blended trail.
  4. TGLHUDSprite objects are used to display the bitmap and the cursor/trail. The
  5. cursor/trail bitmaps share a single material stored in the material library.
  6. The trail uses a particle-system component to track trail bitmaps, each time
  7. the mouse is moved on the scene viewer, the HSCursor sprite is moved accordingly
  8. and a new trail bitmap is created and initialized. Trail bitmaps have a slowly
  9. decreasing alpha channel value and take 5 seconds to go from fully opaque to
  10. fully invisible, and when invisibility is reached, they are killed.
  11. When trails are not active (toggled on/off by a menu item), the status bar
  12. displays the color (RGB) of the point below the cursor, by using the
  13. GetPixelColor function.
  14. }
  15. program CursorD;
  16. uses
  17. Forms,
  18. fCursorD in 'fCursorD.pas' {FormCursor};
  19. {$R *.RES}
  20. begin
  21. Application.Initialize;
  22. Application.CreateForm(TFormCursor, FormCursor);
  23. Application.Run;
  24. end.