Skip to main content
gamedev.net
🔒 Locked

GetNextDataObject

Started by sagron 0 replies 650+ views
Original Post
sagron
sagron
I am currently upgrading an app to DX9.0c(August update) from DX8 and the GetNextDataObject was deprecated. I was using this to loop through meshes and now I'm not sure how to replace it. Can anyone help?
ProgrammingNerd
ProgrammingNerd
Hi,

You can use ID3DXFile interface to use x file, although it is quite different than IDirectXFile interface however. A look at the documentation should help you out. You create the ID3DXFile object and an enum object similar to before, and use the following function:

HRESULT GetDataObjectById(
REFGUID rguid,
LPD3DXFILEDATA *ppDataObj
);

You pass a GUID for the object you want and it will get the next object that is that type. Basically, you would loop through all of the objects that you want and get them this way.There is no function to get the next object.

You can also use the following:

HRESULT GetChild(
SIZE_T id,
ID3DXFileData **ppObj
);

This will get the next child object, which may not be the next object.

And last, you can still use the old interface, but you just need to cast when you need a ID3DXFile or similar interface.

Hope this helps,
ProgrammingNerd

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.