unit fTobitmap; interface uses Winapi.OpenGL, System.SysUtils, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.Imaging.Jpeg, GLS.Scene, GLS.VectorTypes, GLS.Cadencer, GLS.Objects, GLS.SceneViewer, GLS.HUDObjects, GLS.SpaceText, GLS.Coordinates, GLS.Graphics, GLS.Utils, GLS.BaseClasses; type TForm1 = class(TForm) GLSceneViewer1: TGLSceneViewer; GLScene1: TGLScene; Panel1: TPanel; GLCamera1: TGLCamera; GLLightSource1: TGLLightSource; Plane1: TGLPlane; Sphere1: TGLSphere; GLCadencer1: TGLCadencer; DummyCube1: TGLDummyCube; HUDSprite1: TGLHUDSprite; BUSnapShot: TButton; BURenderToBitmap: TButton; BUBitmapx2: TButton; BUBitmap600: TButton; BUBitmap300: TButton; SpaceText1: TGLSpaceText; BUViewerSnapShot: TButton; procedure Sphere1Progress(Sender: TObject; const deltaTime, newTime: Double); procedure FormCreate(Sender: TObject); procedure FormResize(Sender: TObject); procedure BUSnapShotClick(Sender: TObject); procedure BURenderToBitmapClick(Sender: TObject); procedure BUBitmapx2Click(Sender: TObject); procedure BUBitmap600Click(Sender: TObject); procedure BUBitmap300Click(Sender: TObject); procedure BUViewerSnapShotClick(Sender: TObject); private procedure RenderToBitmap(scale : Single); public end; var Form1: TForm1; implementation {$R *.dfm} uses TobitmapImgFm; (* A utility function, this takes the bitmap and uses Form2 to display it with a regular TImage component. *) procedure ViewBitmap(aBitmap : TBitmap; caption : String); var f : TForm2; begin Application.CreateForm(TForm2, f); if (aBitmap.Width