Results 1 to 3 of 3

Thread: problem with LoadMeshFromX and its error message

  1. #1

    problem with LoadMeshFromX and its error message

    Hi guys,

    I have a problem that looks very strange to me:
    In my program I want to load a .x-File

    if failed(D3DXLoadMeshFromX(pChar(FileName), D3DXMESH_SYSTEMMEM,
    scene.D3DDEV8, Adjacency, D3DXMtrlBuffer,
    NumMaterials, Mesh)) then begin ShowMessage('Oh shit!'); exit; end;
    But the function fails (so the message is showed). As I understood DX, in HRESULT of the function should be displayed the error message. but HRESULT is empty. no message like invalidcall or outofmemory...

    Can somebody help me with that? The program compiles normally and without the error message I don't know how to fix my problem.

    Sven
    42 is the answer to all questions.
    <br />But what is the question to all answers?

  2. #2

    problem with LoadMeshFromX and its error message

    So, what is the value of function result?
    Try something like this:
    [pascal][background=#FFFFFF][normal=#000000][number=#0000FF][string=#0000FF][comment=#248F24][reserved=#000000]uses ..., dxerr8;
    ...
    hr:= D3DXLoadMeshFromX(...);
    if FAILED(hr) then
    begin
    ShowMessage(Format('Oh shit!'#10'Error code is: %x'#10'Error description is: %s', [hr, DXGetErrorString8(hr)]));
    end;
    [/pascal]
    There are only 10 types of people in this world; those who understand binary and those who don't.

  3. #3

    problem solved

    Well that was the problem, I made it like you said before, but there was no error message. function result was empty.

    But I already found my mistake. A very dumb one: I forgot to put the .x-file in the right folder..... I'm a really big idiot..
    So, the problem is solved now. everythings runs as it should.

    sven
    42 is the answer to all questions.
    <br />But what is the question to all answers?

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
  •