Hi,
thanks a lot. But i can only read the text for a short second, if i resize the window:
unit uMain;
interface
// Add the TV3D65 Type Library into the uses clause. (TV3D65_TLB).
uses
Windows, Messages, SysUtils, Classes, Forms, Dialogs, TV3D65_TLB;
type
TfrmMain = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
// Declare the TV Variables:
TV : TVEngine;
Scene : TVScene;
MyMesh : TVMesh;
Screen2DText : TVScreen2DText;
Input : TVInputEngine;
Globals : TVGlobals;
RenderSurfaceA : TVRenderSurface;
RenderSurfaceB : TVRenderSurface;
Procedure AppIdle(sender : TObject; var done : boolean);
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
var
T : Integer;
procedure TfrmMain.FormCreate(Sender: TObject);
begin
// Create the TV Interface first:
TV := CoTVEngine.Create;
TV.SetDebugMode(true, true, true, true);
TV.SetDebugFile(ExtractFilePath(Application.ExeName) + 'debugfile.txt');
TV.Init3DWindowed(frmMain.Handle, true);
TV.GetViewport.SetAutoResize(true);
TV.DisplayFPS(true, -1);
TV.SetAngleSystem(TV_ANGLE_DEGREE);
Scene := CoTVScene.Create;
Globals := CoTVGlobals.Create;
Input := CoTVInputEngine.Create;
Input.Initialize(true, true);
Screen2DText := CoTVScreen2DText.Create;
T := Screen2DText.TextureFont_Create('font', 'Arial', 32, True, False, False, False);
Application.OnIdle := AppIdle;
end;
procedure TfrmMain.AppIdle(sender : TObject; var done : boolean);
begin
// Check if the application has focus, if yes thats when we process the loop.
if frmMain.Focused then
begin
// This tells Windows it isnt done, so it will continue to loop.
done := false;
// The actual render loop:
TV.Clear(False);
Screen2DText.Action_BeginText(True);
Screen2DText.TextureFont_DrawBillboardText('Hello', 5, 5, 40, $FFFFFF, T, 5, 5);
Screen2DText.Action_EndText;
// Scene.RenderAll(true, true);
// Scene.RenderAllMeshes(true);
TV.RenderToScreen;
// Lets check if the user presses ESC key, if yes we will quit the app.
If Input.IsKeyPressed(TV_KEY_ESCAPE) then Close();
// Process any messages Windows has for the application, do this last:
Application.ProcessMessages;
end;
end;
I don't know why

Greetings