directx

Matrix multiplication - view/projection, world/projection, etc

陌路散爱 提交于 2019-12-03 04:47:12
In HLSL there's a lot of matrix multiplication and while I understand how and where to use them I'm not sure about how they are derived or what their actual goals are. So I was wondering if there was a resource online that explains this, I'm particularly curious about what is the purpose behind multiplying a world matrix by a view matrix and a world+view matrix by a projection matrix. You can get some info, from a mathematical viewpoint, on this wikipedia article or on msdn . Essentially, when you render a 3d model to the screen, you start with a simple collection of vertices scattered in 3d

How do I balance script-oriented OpenType features with other OpenType features using DirectWrite?

一世执手 提交于 2019-12-03 03:49:39
Full disclosure: I'm working on my libui GUI framework's text API. This wraps DirectWrite on Windows, Core Text on OS X, and Pango (which uses HarfBuzz for OpenType shaping) on other Unixes. One of the text formatting attributes I want to specify is a collection of OpenType features to use, which all three provide; DirectWrite's is IDWriteTypography . Now, when you draw some text with these libraries, by default you'll get a few useful OpenType features enabled, such as the standard ligatures ( liga ) like the f+i ligature. I thought this was font-specific, but it turns out this is specific to

Game Development in Delphi

夙愿已清 提交于 2019-12-03 03:19:37
问题 I would like to have a go at making some simple games for personal/learning purposes. By simple games I mean games like platform, maze, arcade games for example. I would also one day like to create a platform game with a simple editor to allow others to edit and design their own game levels. I am not sure if Delphi is the way to go though, I don't see or hear many people writing games in Delphi, but Delphi is the only language I understand on an intermediate level. If Delphi is acceptable to

D3D11: How to draw a simple pixel aligned line?

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to draw a line between two vertices with D3D11. I have some experiences in D3D9 and D3D11, but it seems to be a problem in D3D11 to draw a line, which starts in one given pixel and ends in an other. What I did: I added 0.5f to the pixel coordinates of each vertex to fit the texel-/pixel coordinate system (I read the Microsoft pages to the differeces between D3D9 and D3D11 coordinate systems): f32 fOff = 0.5f; ColoredVertex newVertices[2] = { { D3DXVECTOR3(fStartX + fOff, fStartY + fOff,0), vecColorRGB }, { D3DXVECTOR3(fEndX + fOff,

Missing files, DirectX SDK (d3dx9.lib, d3dx9.h)

≯℡__Kan透↙ 提交于 2019-12-03 02:59:30
I installed the DirectX SDK June 10 , but when I include the d3dx9.h , the compiler can't find it. I checked the SDK directory, and I didn't find it there either. files missing: d3dx9.lib , d3dx9.h , dxfile.h . The DirectX SDK installation will add a Property Sheet Macro called $(DXSDK_DIR) into Visual Studio. Instead of inserting an absolute path in your Include and Library Directories, I'd recommend using this macro to set the Include and Library path for DX dependencies. As Include Directory add: $(DXSDK_DIR)Include As Library Directory add: $(DXSDK_DIR)Lib\x86 or $(DXSDK_DIR)Lib\x64 on a

Quaternion camera. How do I make it rotate correctly?

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a 3D camera with its current rotation stored as a quaternion, and I'm having trouble rotating it correctly. I want the camera to rotate incrementally around its local axes based on mouse movement each frame (first-person-shooter-style), but the rotation is wrong. It kind of works, but the camera seems to "roll" around its forward axis when it shouldn't. I update the rotation each frame with this function: void Camera::rotate(const Quat& q) { // m_rot is the current rotation m_rot = m_rot * q; } Here's my quaternion multiplication

Hook/Overlay a DirectX game?

匿名 (未验证) 提交于 2019-12-03 02:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can anyone tell me how to hook/overlay a DirectX game in C#? I've tried getting a fullscreen C# window to overlap a game, however it wont. After researching a little, I found out that I need to hook the game and then display the C# window. Can anyone explain how I would do this? Would I be able to display a C# form over a DirectX game? 回答1: (disclosure: I work for this company) You can try our Deviare API , it has functionality to hook COM objects from C#. It's a set of COM objects that can be used from any programming language (supporting

Hooking DirectX EndScene from an injected DLL

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to detour EndScene from an arbitrary DirectX 9 application to create a small overlay. As an example, you could take the frame counter overlay of FRAPS, which is shown in games when activated. I know the following methods to do this: Creating a new d3d9.dll , which is then copied to the games path. Since the current folder is searched first, before going to system32 etc., my modified DLL gets loaded, executing my additional code. Downside: You have to put it there before you start the game. Same as the first method, but replacing the

Take screenshot of DirectX full-screen application

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: This boggles me. DirectX bypasses everything and talks directly to the device driver, thus GDI and other usual methods won't work - unless Aero is disabled (or unavailable), all that appears is a black rectangle at the top left of the screen. I have tried what other have suggested on several forums, using DirectX to get the back buffer and save it, but I get the same result: device->GetFrontBufferData(0, surface); D3DXSaveSurfaceToFile("fileName", D3DXIFF_BMP, surface, NULL, NULL); Is there any way to get a screenshot of another

Using Qt with DirectX?

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: What exactly are my options? I have programs I need to write in OpenGL and DirectX , and I'd like to use Qt for OpenGL, and not have to re-implement half my program for the DirectX components of my task. I've looked on Google and I have found references to people complaining about Direct3D being a dependency of Qt, and people talking about implementing QD3DWidget sub-classing QWidget in a similar fashion to QGLWidget, yet nobody talked about how to implement it or where any examples are. I need help. I want to know if it is