English 中文(简体)
Using DirectX headers from Wine to compile under MingW
原标题:

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 ?

最佳回答

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.

问题回答

暂无回答




相关问题
gcc -fPIC seems to muck with optimization flags

Following along from this question: how-do-i-check-if-gcc-is-performing-tail-recursion-optimization, I noticed that using gcc with -fPIC seems to destroy this optimization. I am creating a shared ...

Generate assembler code from C file in linux

I would like to know how to generate assembler code from a C program using Unix. I tried the gcc: gcc -c file.c I also used firstly cpp and then try as but I m getting errors. I m trying to build an ...

Getting rid of pre-compiled headers

OK, I have old Metrowerks code for Mac and Windows where the previous developer used pre-compiled headers for every project that this code base builds. How does one get rid of Pre-compiled headers, ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

How to compile for Mac OS X 10.5

I d like to compile my application for version 10.5 and forward. Ever since I upgraded to Snow Leopard and installed the latest XCode, gcc defaults to 10.6. I ve tried -isysroot /Developer/SDKs/...

热门标签