Skip to main content
gamedev.net
🔒 Locked

problem rendering x files

Started by damjan 0 replies 250+ views
Original Post
damjan
damjan
I have a problem rendering the scene in the .x file. Everything works if I use the simpler D3DXLoadMeshFromX function, but then I cannot access the scene hierarchy. In that case I have to create many materials and assign different one to each scene part so I can draw them separately with DrawSubset. Only this way I can make additional transformations to separate objects. I tried reading the scene hierarchy using D3DXLoadMeshFromXof function, but then the transformations inside the .x file are not executed?! E.g. two cubes, one beside the other, are correctly displayed if I read the .x file with D3DXLoadMeshFromX but wrong if I use D3DXLoadMeshFromXof (they overlap). Where is the problem? I used Jim Adams'' (book code) .x file parser which seems to be reading the file correctly, but I must be missing something. Is the D3DXLoadMeshFromXof function only for the skinned meshes? Or do I have to read and execute the transformations myself? Thanks, Damjan
neneboricua19
neneboricua19
I haven''t read Jim Adams book, but if you want to load a mesh hierarchy, you should use the function D3DXLoadMeshHierarchyFromX.

neneboricua

Topic Locked

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

Sign in to reply to this topic.