PDA

View Full Version : DelphiX 3d retained mode woes



czar
20-05-2004, 09:04 PM
Hi all,

I am trying to re-compile a program that was written a number of years ago using DelphiX. The program uses some 3d stuff, in retained mode. Originally it was probably compiled using delphi 4 and some version of delphiX. Now we are using delphi 5 & 6 and the latest version of delphiX.

Now the trouble is although it compiles fine I get access violation errors when the program is run. It is not just this particular program but any program that was written using 3d elements. I managed to get it to run past a few areas that were causing grief by changing options on the DXDraw. However this next problem I am stuck with. Help

A procedure is called from the main unit

changeFrameName(DXDraw1,'x3ds_coin', 'coin'+inttostr(i));


procedure changeFrameName(DXDraw: TDXDraw; a, b: string);
var tmp: IDIRECT3DRMOBJECT;
PartFrame: IDirect3DRMFrame;
begin
DXDraw.D3DRM.GetNamedObject(PChar(a), tmp);
PartFrame:=IDIRECT3DRMFRAME(tmp);
PartFrame.SetName(PChar(b));
end;


Its gets to this line "PartFrame.SetName(PChar(b));" and crashes.
The value of tmp is nil.

Can anyone help? Make a suggestion? Point out what may be the problem?