Pelles C forum

C language => User contributions => Topic started by: karabas on November 20, 2016, 12:36:34 PM

Title: directx sample
Post by: karabas on November 20, 2016, 12:36:34 PM
directx sample  one from codesampler.com (directx 9)
and other from directx sdk (directx 11)
Title: Re: directx sample
Post by: frankie on November 20, 2016, 10:17:37 PM
Welcome Karabas and thanks for the samples.
I used them to check my fSDK.
I attached the samples (requires installation of fSDK (http://forum.pellesc.de/index.php?topic=7017.msg26620#msg26620)).
Title: Re: directx sample
Post by: frankie on November 20, 2016, 10:18:08 PM
And 2nd...
Title: Re: directx sample
Post by: JohnF on November 21, 2016, 04:06:02 PM
And 2nd...

D3DX11CompileFromFile will not load the .fx file.

:(

John
Title: Re: directx sample
Post by: karabas on November 21, 2016, 04:24:36 PM
To Frankie
Very thanks fSDK.
Sorry my english.
Title: Re: directx sample
Post by: frankie on November 21, 2016, 04:49:25 PM
John have you installed the last fSDK?
It works for me...
Title: Re: directx sample
Post by: frankie on November 21, 2016, 05:00:40 PM
karabas it's OK, no problem. :D
Title: Re: directx sample
Post by: JohnF on November 21, 2016, 05:23:04 PM
John have you installed the last fSDK?
It works for me...

Yes.

The MessageBox is displayed at this part of the code.

Code: [Select]
    hr = CompileShaderFromFile( "Tutorial02.fx", "VS", "vs_4_0", &pVSBlob );
    if( FAILED( hr ) )
    {
        MessageBox( NULL, "The FX file cannot be compiled.  Please run this executable from the directory that contains the FX file.", "Error", MB_OK );
        return hr;
    }

John
Title: Re: directx sample
Post by: Robert on November 21, 2016, 05:54:18 PM
And 2nd...

D3DX11CompileFromFile will not load the .fx file.

:(

John

Hi frankie:

I have the same problem. I modified the filename by adding the full path but it still would not load the .fx file.

Robert Wishlaw
Title: Re: directx sample
Post by: frankie on November 21, 2016, 06:47:07 PM
Hello Robert, Hello John
I put up a virtual machine to check, and as far as now it doesn't seem to be a problem with the fSDK or the compiler, but the shader build tool. It's not clear right now if you must have the DirectX SDK installed or the SDK binaries in the path environment...
Now I cannot go on I'll check more and let you know.
On my system where almost all SDK's are installed it works.
Title: Re: directx sample
Post by: TimoVJL on November 21, 2016, 07:07:00 PM
Windows 8.1: missing d3dcompiler_43.dll (comes with d3dcompiler_47.dll)
After copying that to path, example dx11_2.exe run.

PS: if you have Firefox, look there.
current browsers have d3dcompiler_47.dll
check those folders first.
Title: Re: directx sample
Post by: JohnF on November 22, 2016, 07:33:07 AM
Yes that works.

John
Title: Re: directx sample
Post by: frankie on November 22, 2016, 10:11:52 AM
Thanks Timo.
This is exactly the problem. On my machine it works because I have installled the SDK 2010.
The program fails also on Win7.
When possible I'll port the D3DCompileFromFile() that should work for W7, W8.1 and maybe newer (MS deprecated support for runtime compilation).
Title: Re: directx sample
Post by: frankie on November 22, 2016, 06:59:02 PM
I have find the problem.
My libraries use dll names without revision. I.e. d3dx9.dll instead of d3dx9_43.dll
I have modified the whole fSDK. I'll check it better and in those days I'll deploy the fixed final version.
Title: Re: directx sample
Post by: TimoVJL on November 24, 2016, 01:01:49 PM
Tutorial3 that use d3d11_1.h