News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

directx sample

Started by karabas, November 20, 2016, 12:36:34 PM

Previous topic - Next topic

karabas

directx sample  one from codesampler.com (directx 9)
and other from directx sdk (directx 11)

frankie

#1
Welcome Karabas and thanks for the samples.
I used them to check my fSDK.
I attached the samples (requires installation of fSDK).
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

frankie

"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

JohnF

Quote from: frankie on November 20, 2016, 10:18:08 PM
And 2nd...

D3DX11CompileFromFile will not load the .fx file.

:(

John

karabas

To Frankie
Very thanks fSDK.
Sorry my english.

frankie

#5
John have you installed the last fSDK?
It works for me...
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

frankie

karabas it's OK, no problem. :D
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

JohnF

Quote from: frankie on November 21, 2016, 04:49:25 PM
John have you installed the last fSDK?
It works for me...

Yes.

The MessageBox is displayed at this part of the code.


    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

Robert

#8
Quote from: JohnF on November 21, 2016, 04:06:02 PM
Quote from: frankie on November 20, 2016, 10:18:08 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

frankie

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.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

TimoVJL

#10
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.
May the source be with you

JohnF


frankie

#12
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).
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

frankie

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.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

TimoVJL

Tutorial3 that use d3d11_1.h
May the source be with you