NO

Author Topic: directx sample  (Read 6709 times)

karabas

  • Guest
directx sample
« on: November 20, 2016, 12:36:34 PM »
directx sample  one from codesampler.com (directx 9)
and other from directx sdk (directx 11)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: directx sample
« Reply #1 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).
« Last Edit: November 21, 2016, 04:48:45 PM by frankie »
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: directx sample
« Reply #2 on: November 20, 2016, 10:18:08 PM »
And 2nd...
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

JohnF

  • Guest
Re: directx sample
« Reply #3 on: November 21, 2016, 04:06:02 PM »
And 2nd...

D3DX11CompileFromFile will not load the .fx file.

:(

John

karabas

  • Guest
Re: directx sample
« Reply #4 on: November 21, 2016, 04:24:36 PM »
To Frankie
Very thanks fSDK.
Sorry my english.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: directx sample
« Reply #5 on: November 21, 2016, 04:49:25 PM »
John have you installed the last fSDK?
It works for me...
« Last Edit: November 21, 2016, 05:00:05 PM by frankie »
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: directx sample
« Reply #6 on: November 21, 2016, 05:00:40 PM »
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

  • Guest
Re: directx sample
« Reply #7 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

Offline Robert

  • Member
  • *
  • Posts: 245
Re: directx sample
« Reply #8 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
« Last Edit: November 21, 2016, 05:56:01 PM by Robert »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: directx sample
« Reply #9 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.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: directx sample
« Reply #10 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.
« Last Edit: November 24, 2016, 10:14:23 AM by TimoVJL »
May the source be with you

JohnF

  • Guest
Re: directx sample
« Reply #11 on: November 22, 2016, 07:33:07 AM »
Yes that works.

John

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: directx sample
« Reply #12 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).
« Last Edit: November 22, 2016, 10:16:06 AM by frankie »
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: directx sample
« Reply #13 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.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: directx sample
« Reply #14 on: November 24, 2016, 01:01:49 PM »
Tutorial3 that use d3d11_1.h
May the source be with you