Tobitmap.dpr 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. {: Render To Bitmap sample.
  2. This demo illustrates the two ways to obtain a 3D scene in a bitmap.
  3. The first, which is also the fastest, is to use CreateSnapShot. It allows
  4. to obtain what you see on the screen, as it was rendered by the 3D acceleration
  5. device if any is available.
  6. The second is to use RenderToBitmap. This makes use of Software OpenGL
  7. rendering and is significantly slower, but you can render to any size,
  8. including to bitmap much larger than the screen which are suited for use
  9. in printed documents for instance.
  10. Note that since RenderToBitmap uses software OpenGL, the output may be
  11. different from what you get with hardware acceleration, not only because
  12. the rasterizer is different, but also because the software implementation
  13. may not support the same feature set.
  14. }
  15. program Tobitmap;
  16. uses
  17. Forms,
  18. fTobitmap in 'fTobitmap.pas' {Form1},
  19. fTobitmapImg in 'fTobitmapImg.pas' {Form2};
  20. {$R *.res}
  21. begin
  22. Application.Initialize;
  23. Application.CreateForm(TForm1, Form1);
  24. Application.CreateForm(TForm2, Form2);
  25. Application.Run;
  26. end.