ScreenSaverDemo.dpr 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {: Sample screen-saver for GLScene using TScreenSaver.
  2. I've kept the OpenGL stuff to a minimum here, the saver is just animating
  3. a cube on your screen, with 3 colored dancing light source. All movements
  4. are handled through Inertia behaviours and the Cadencer, this is why you
  5. won't find any animation code here :).
  6. This saver has two forms : this one is the main saver screen, Form2 is the
  7. properties screen (adjust torus tesselation).
  8. Apart from dropping a TScreenSaver on Form1 and handling OnpropertiesRequested
  9. to display Form2, I did these things :<ul>
  10. <li>changed the extension to "scr" in Project/Options/Application
  11. <li>removed Form2 from the autocreate list (I moved the code from project1.dpr
  12. to the OnPropertiesRequest event code
  13. </ul>
  14. In most cases, these are the only steps required for making a screen-saver.
  15. NB : Password stuff does not work under NT.
  16. }
  17. program ScreenSaverDemo;
  18. uses
  19. Forms,
  20. Unit1 in 'Unit1.pas' {Form1},
  21. Unit2 in 'Unit2.pas' {Form2};
  22. {$E scr}
  23. {$R *.RES}
  24. begin
  25. Application.Initialize;
  26. Application.CreateForm(TForm1, Form1);
  27. Application.Run;
  28. end.