|
-
May 24th, 2007, 09:38 AM
#1
Thread Starter
Junior Member
How to load x-file from byte-array
Sry that it´s me again, but its gonna frustrating.
I thought I could load the mesh from resource, like I did with my texture.
So I loaded the file checked if all is ok then switch to LoadFromResource, but the function I saw is from DX9 not DX8. So I´m wondering if I could load my mesh from a resource.
Till now I got the x-file loaded from resource into a bytearray, but don´t know how to create the meshobject (like Set meshobject = D3DXLoadMeshFromXInMemory). The only way I found that comes a little bit closer to the solution is the function D3DX8.LoadMeshFromXof. Here I can parse the data for myself (never tried, but keep on walking) but it still needs a file.
This is where I am till now, maybe I have something overlooked but at the moment I´m running in circles.
Thanks for viewing.
-
May 26th, 2007, 05:34 PM
#2
Lively Member
Re: How to load x-file from byte-array
DirectX 8 should have some function (or set of functions) that allow you to load a mesh from a file name and creates a mesh object for you. Honestly, the best thing would be to search through the SDK examples/tutorials that came with the DirectX8 SDK on how to load an X file in DX8. It should give you all the code needed.
Also, take a look over at http://directx4vb.vbgamer.com/ under the DirectX8 tutorials. I think they have code there to load an X file.
-
May 28th, 2007, 04:10 PM
#3
Thread Starter
Junior Member
Re: How to load x-file from byte-array
Thank you fartman for your answer,
perhaps I havn´t explained it right, because I want to load the mesh from an x-file I put into a resource-container. There is a function for textures (D3DXTextureFromMemory) but no method like D3DXLoadMeshFromXInMemory. This method is in DX9 available but not in DX8.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|