问题标签 [directx]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
5 回答
11130 浏览

c++ - 有哪些关于 2D 游戏引擎设计的好资源?

我在业余时间使用 C++ 和 DirectX 进行 2D 游戏开发。我发现企业问题域建模方法并没有我想要的那么多帮助;)

我或多或少在寻找与基本游戏引擎设计等效的“最佳实践”。实体应如何相互交互,动画和声音应如何在理想世界中表示,等等。

谁有好的资源可以推荐?

0 投票
4 回答
1024 浏览

winforms - Windows 窗体:以非图形方式运行时的屏幕截图(即屏幕保护程序处于活动状态)

我有一个基于 DirectX 和 Windows 窗体的图形密集型应用程序。它有一个自动化和重放框架,围绕该框架构建了一个自动化测试系统。不幸的是,当在夜间构建期间无人看管地运行测试时,显示器处于非活动状态或与屏幕保护程序绑定,并且我们的 IT 安全策略不允许我们禁用它。

所以我的问题是:有没有办法对没有显示运行的应用程序进行“屏幕”捕获?我想确保显卡已启用,以便我的渲染管道相同,但测试框架不需要关心显示的状态。

任何帮助都非常感谢!

0 投票
4 回答
5442 浏览

c++ - 有哪些适合初学者的良好 DirectX 资源?

我正在学习 DirectX 作为一个爱好项目的一部分。我一直在为 DirectX9 寻找一些好的在线资源(使用 C++,如果这种区别很重要的话),但还没有找到任何东西 a) 非常适合初学者和 b) 是最新的。

有什么建议吗?

0 投票
1 回答
216 浏览

directx - MaxTextureRepeat 限制在什么时候发挥作用?

在 Direct3D 下执行像素着色器时,MaxTextureRepeat 对纹理坐标施加的限制是否仅在调用纹理查找函数(如 Tex2D())期间成为问题,或者它们是否会在着色器中访问纹理坐标时发挥作用?

我想知道是否可以通过在纹理坐标上调用 frac() 之类的东西来避免 MaxTextureRepeat 限制,然后再将它们传递给纹理查找函数。

0 投票
4 回答
8137 浏览

winapi - 如何捕捉正在播放的音频?

有谁知道如何以编程方式捕获正在播放的声音(即来自声卡的所有声音,而不是麦克风等输入设备)。

0 投票
4 回答
3087 浏览

directx - 我应该现在创建 CUDA 应用程序,还是等待 DirectX 11?

Windows 7 可能会在明年 10 月进入 RTM(以及 DirectX 11),是否值得等待 DirectX 11 的显式 GPGPU 功能,这意味着它将是跨平台的(ATI/Nvidia,而不是 Windows/Linux/Mac/Whatever) ; 还是我现在应该创建一个 CUDA 应用程序?

0 投票
1 回答
1563 浏览

directx - 我可以在没有整个 DirectX SDK 的情况下获得 DirectInput / XInput 吗?

我正在开发一个内部应用程序,它将使用 XInput 或 DirectInput 从 Xbox 360 控制器中读取。(我认为这将是让操作员掌握多个控件的最便宜/最简单的方法。)

我需要对所有源代码和工具进行源代码控制,这也意味着 SDK 的。我宁愿不使用所有 DirectX —— DirectInput 和 XInput 是否可以与整个 DirectX SDK 分离?

0 投票
2 回答
1959 浏览

c++ - IDirectInputDevice8 键盘挂钩

我们有一个通过 IDirectInputDevice8 检索键盘按下的 3D 应用程序。有什么办法,当我们通过 win32 API winproc 循环检索键盘事件时,我们可以将这些命令发送到 DirectInputDevice?

0 投票
4 回答
294 浏览

graphics - Modelling an I-Section in a 3D Graphics Library

I am using Direct3D to display a number of I-sections used in steel construction. There could be hundreds of instances of these I-sections all over my scene.

I could do this two ways:

I-Sections

Using method A, I have fewer surfaces. However, with backface culling turned on, the surfaces will be visible from only one side. If backface culling is turned off, then the flanges (horizontal plates) and web (vertical plate) may be rendered in the wrong order.

Method B seems correct (and I could keep backface culling turned on), but in my model the thickness of plates in the I-section is of no importance and I would like to avoid having to create a separate triangle strip for each side of the plates.

Is there a better solution? Is there a way to switch off backface culling for only certain calls of DrawIndexedPrimitives? I would also like a platform-neutral answer to this, if there is one.

0 投票
2 回答
2995 浏览

c# - 如何在 DirectX 中绘制橡皮筋矩形?

如何在 DirectX 中绘制 2D 橡皮筋矩形?最好使用 C#。