Results 1 to 8 of 8

Thread: Problems w/ D3DXLoadMeshHierarchyFromX

  1. #1

    Problems w/ D3DXLoadMeshHierarchyFromX

    Vars im using:
    Alloc: ID3DXAllocateHierarchy;
    FrameHeirarchy: PD3DXFRAME;
    AnimController: ID3DXANIMATIONCONTROLLER;


    the procedure:
    if FAILED(D3DXLoadMeshHierarchyFromX('bones_all.x', D3DXMESH_MANAGED, g_pd3dDevice, Alloc, nil, FrameHeirarchy, AnimController)) then Exit;


    The procedure D3DXLoadMeshHierarchyFromX is returning a FAILED result. What im doing wrong?

    I'm 100% sure thats all ok with the X file (i tried to load others too, but still returning false).

    Thanks.

  2. #2

    Problems w/ D3DXLoadMeshHierarchyFromX

    Have you created ID3DXAllocateHierarchy
    example:
    Alloc := ID3DXAllocateHierarchy.Create;
    ...
    Alloc.Free;

    //ID3DXAllocateHierarchy is actually a class in Delphi even though it starts with an I.

    Everything else seems fine.

  3. #3

    Problems w/ D3DXLoadMeshHierarchyFromX

    Hello Dan, thanks for your reply!

    I tried alloc:=ID3DXAllocateHierarchy.Create; and alloc.Free; before D3DXLoadMeshHierarchyFromX, but now im get an error in D3DXLoadMeshHierarchyFromX: "Exception EAbstractError in module Meshes.exe at 0000BC57 Abstract Error."

  4. #4

    Problems w/ D3DXLoadMeshHierarchyFromX

    you should put alloc.Free; after D3DXLoadMeshHierarchyFromX

  5. #5

    Problems w/ D3DXLoadMeshHierarchyFromX

    Yes, i put Alloc.Free after and alloc.create before, but the D3DXLoadHierarchyFromX is returning that error :/

  6. #6

    Problems w/ D3DXLoadMeshHierarchyFromX

    Have you tried enabling the DirectX Debug runtimes? They are provided with the DX SDK, and they are the key debugging tool for DX Developers. It returns detailed info about what went wrong

    NOTE: You are using D3DX routines, so you have to turn D3DX Debugging on. Check the D3DX9.pas header. There you have to enable a compiler directive (by removing a point).

    Hope this helps.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  7. #7

    Problems w/ D3DXLoadMeshHierarchyFromX

    You have to define your own class which inherits from ID3DXAllocateHierarchy and override the 4 virtual abstract methods defined in that class. What to do in those overriden methods is beyond me, never worked with it. Maybe you can read up some documentation on MSDN.

  8. #8

    Problems w/ D3DXLoadMeshHierarchyFromX

    So i might define my own class? DX Headers dont already have a class for this?

    Ok thanks, ill try it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •