OpenGL Library for Delphi,
maintained by Eric Grange,
based on Mike Lischke's GLScene.

 

Tips - How to take a snapshot from the GLScene viewer


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 your GLScene folder
...\Demos\rendering\tobitmap

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.0571 seconds