So I tried the second solution but won't work.
I load the DDS file like this :
var img : TImagingGraphic;
dxsurf : TDirectDrawSurface; //that's the DX surface I will use later
img := TImagingGraphic.Create;
img.LoadFromFile('mydds.dds');
but then trying to test if all OK until now, I do :
img.SaveToFile('test.dds');
and the produced test.dds file has a bitmap header, it's not a dds file.
Anyway, I continue with :
dxsurf := TDirectDrawSurface.Create(form1.DXDraw1.DDraw);
dxsurf.SetSize(img.Width, img.Height);
dxsurf.Fill(0);
and then either of the following two :
dxsurf.Lock;
Move(img, dxsurf, SizeOf(img);
dxsurf.UnLock;
OR
mmm := TMemoryStream.Create;
img.SaveToStream(mmm);
dxsurf.Lock;
move(mmm, dxsurf, sizeof(mmm));
dxsurf.UnLock;
When "unlocking" the program hangs.
Also, if I use sizeof(img), it's always = 4, is that strange ?
and finally I start the DXTimer :
form1.dxtimer1.enabled := TRUE;
As usual, I try to draw the surface on the main DXDraw Surface, in the OnTimer event of DXTimer, using :
form1.DXDraw1.Surface.Fill(clSilver);
form1.DXDraw1.Surface.Draw(0,0,dxsurf);
I read somewhere that when I use Move, I must copy after the 5th byte of the DDS file that is in memory.
Does it make any sense to try that ?
Thank you.