D3DX10CreateEffectFromFile problem [SOLVED]

Started by
-1 comments, last by etsuja 16 years, 11 months ago
I'm trying to create an effect from a file with this code copied from one of the tutorials. A few arguments were changed to fit my project but it just isn't working.


hr = D3DX10CreateEffectFromFile( L"CO.fx", NULL, NULL, "fx_4_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, 
                                     DXUTGetD3D10Device(), NULL, NULL, &g_pEffect, NULL, NULL );
    if( FAILED( hr ) )
    {
        MessageBox( NULL, L"The FX file cannot be located.  Please run this executable from the directory that contains the FX file.", L"Error", MB_OK );
        V_RETURN( hr );
    }




I don't know why it can't find the FX file... I have it in the same directory as the executable. the tutorial I copied it from finds the file fine but mine doesn't for some reason. The error code I get is 80004005. *EDIT* I'm a complete puts, I was calling the function at the wrong point in my code. Anyway, problems been solved. [Edited by - etsuja on May 22, 2007 12:20:49 AM]
Artist 1st - Programmer 2nd(I'll get some material linked here sometime to support these claims, haha)

This topic is closed to new replies.

Advertisement