使用 Wine 中的 DirectX 标头在 MingW 下进行编译
我一直在尝试将 HLSL 着色器支持构建到 VLC 播放器中。由于 MingW 中的 d3d9.h 中缺少加载 .fx 文件并编译着色器的实用方法,我遇到了困难。因此,在 VLC 开发人员的建议下,我从 Wine 借用了 DX9 标头。
现在,启用 d3dx9.h include 后,我会出现许多以下形式的编译器错误:
描述 资源路径 位置类型 /mingw/lib/gcc/mingw32/3.4.5/../../../../include/d3dx9core.h 参数“D3DXCheckVersion”的声明,但没有此类参数 ShadedDXPlugin 第 475 行 C/C++ 问题
可以任何主体熟悉 MingW、GCC、DirectX 和 Wine 是否有助于让 HLSL 着色器通过 GCC 工作?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
VLC 团队再次带来了一些奇妙的建议,我希望他们在某个时候能够参与到 stackoverflow 声誉的激烈竞争中:
1) 编译对 DirectX 着色器加载和组装的调用,将其加载到一个单独的基于 MSVC 的 DLL 中,该 DLL 可以访问标准微软标头。然后从 VLC 链接到该 DLL。
2) 在 d3d9.h 中插入 GetProcAddress 技巧以获取 D3DXAssembleShaderFromFile。 directx 实用程序中的上述函数可从 HLSL 生成装配着色器。
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.