• Advertisement
Sign in to follow this  

D3DX10CreateEffectFromFile problem [SOLVED]

This topic is 3959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement