Sample code using GLSceneViewer1.Buffer.CreateSnapShot
procedure TForm1.TakeSnapShot;var  bm : TBitmap;
  bmp32 : TGLBitmap32;
begin  bmp32:=GLSceneViewer1.Buffer.CreateSnapShot;
  try
    bm:=bmp32.Create32BitsBitmap;
    try
      SavePictureDialog1.DefaultExt := GraphicExtension(TBitmap);
      SavePictureDialog1.Filter := GraphicFilter(TBitmap);
      if SavePictureDialog1.Execute then
        bm.SaveToFile(SavePictureDialog1.FileName);
      finally
        bm.Free;
      end;
  finally
    bmp32.Free;
  end;
end;
Theres also a demo in CVS at:
CVS/Demos/rendering/tobitmap
Comments (0)
You don't have permission to comment on this page.