tags:

views:

176

answers:

1

I have been attempting to build HLSL shader support into VLC player. I have hit a brick wall due to lack of utility methods in d3d9.h in MingW to load a .fx file and compile the shader. So under advise from VLC developers I borrowed the DX9 headers from Wine.

Now with the d3dx9.h include enabled I have lots of compiler errors in the form:

Description Resource Path Location Type /mingw/lib/gcc/mingw32/3.4.5/../../../../include/d3dx9core.h declaration for parameter "D3DXCheckVersion" but no such parameter ShadedDXPlugin line 475 C/C++ Problem

Can any body familiar with MingW, GCC, DirectX and Wine shed some light on getting HLSL shaders working via GCC ?

+1  A: 

The VLC team has again come back with some marvellous suggestions and I would like them to get into the rat race of stackoverflow reputation at some point:

1) Compile the calls to DirectX shader loading and assembling into a separate MSVC based DLL's which can access the standard microsoft headers. Then link to this DLL from VLC.

2) Insert GetProcAddress trick to get D3DXAssembleShaderFromFile in the d3d9.h. The said function in a directx utility to produce an assembly shader from HLSL.

whatnick