X File in DirectX laden ?
-
Hi,
ich wollte fragen ob einer weis wie man in DX 8 ein X Modell laden kann.
THX im voraus.
-
Bei DirectX 9 so: Aus der SDK Doc:
Loading an X File
--------------------------------------------------------------------------------
Use the following procedure to load an .x file.
Use the DirectXFileCreate function to create an IDirectXFile object.
If templates are present in the Microsoft DirectX file that you will load, use the IDirectXFile::RegisterTemplates method to register those templates.
Use the IDirectXFile::CreateEnumObject method to create an IDirectXFileEnumObject enumerator object.
Loop through the objects in the file. For each object, perform the following steps.
Use the IDirectXFileEnumObject::GetNextDataObject method to retrieve each IDirectXFileData object.
Use the IDirectXFileData::GetType method to retrieve the data's type.
Load the data using the IDirectXFileData::GetData method.
If the object has optional members, retrieve the optional members by calling the IDirectXFileData::GetNextObject method.
Release the IDirectXFileData object.
Release the IDirectXFileEnumObject object.
Release the IDirectXFile object.
-
Jo Danke aber ich brauch DX 8, und wenns geht den Quellcode, dann muss ich nur noch ein paar Sachen abändern. :p
-
http://www.andypike.com/tutorials/directx8/010.asp
is zwar englisch, aber wirklich sehr gut verständlich
-
Jo, geht schon. Danke !