Originally Posted by
ijcro
OK I will see it.
If you'd like I have written a simple example problem reproduction:
Code:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DXClass, DXDraws, StdCtrls;
type
TForm1 = class(TForm)
dd1: TDXDraw;
DXTimer1: TDXTimer;
rb1: TRadioButton;
RadioButton1: TRadioButton;
procedure DXTimer1Timer(Sender: TObject; LagCount: Integer);
procedure dd1Initialize(Sender: TObject);
procedure PrepareNewSurface;
private
newsurface: TDirectDrawSurface;
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
var
nWidth: Integer = 0;
bGoing: Boolean = true;
procedure TForm1.PrepareNewSurface;
begin
newsurface.Fill( 0 );
newsurface.Canvas.Rectangle( 10, 10, 10 + nWidth, 50 );
if bGoing then
begin
Inc( nWidth, 3 );
if nWidth = newsurface.Width - 10 then
bGoing := not bGoing;
end
else
begin
Dec( nWidth, 3 );
if nWidth <= 10 then
bGoing := not bGoing;
end;
newsurface.Canvas.Release;
end;
procedure TForm1.DXTimer1Timer(Sender: TObject; LagCount: Integer);
begin
dd1.surface.fill( 0 );
PrepareNewSurface;
if radiobutton1.Checked then
dd1.Surface.Draw( 0, 0, newsurface )
else
dd1.Surface.BltFast( 0, 0, dd1.surface.ClientRect, 0, newsurface );
dd1.surface.canvas.release;
dd1.Flip;
end;
procedure TForm1.dd1Initialize(Sender: TObject);
begin
newsurface :=TDirectDrawSurface.Create( dd1.DDraw );
newsurface.SetSize( dd1.Width, dd1.height );
end;
If I use Non-hardware acceleration (removing the [do3D] from options), it works but with software.
Thanx!
Bookmarks