directx

Typical rendering strategy for many and varied complex objects in directx?

点点圈 提交于 2019-12-21 04:07:14
问题 I am learning directx. It provides a huge amount of freedom in how to do things, but presumably different stategies perform differently and it provides little guidance as to what well performing usage patterns might be. When using directx is it typical to have to swap in a bunch of new data multiple times on each render? The most obvious, and probably really inefficient, way to use it would be like this. Stragety 1 On every single render Load everything for model 0 (textures included) and

HTML/CSS Renderer for Metro-Style Apps

99封情书 提交于 2019-12-21 02:45:22
问题 The current WebView for Metro-Style apps is unusable for me because it is hosted in a seperate HWND, making it impossible to overlay the WebView with other controls. Additionally, the APIs provided are not enough for me to use it (e.g. no possibilty to handle the "onNavigation" events). I am looking for a C++ library that can parse HTML/CSS and render using DirectX. I am willing to write my own renderer but it is not easy. I would help to atleast have a proper HTML/CSS parser. I also checked

How to bring up the Windows 8 on-screen keyboard in a desktop app

試著忘記壹切 提交于 2019-12-21 02:24:04
问题 I have a fullscreen DirectX desktop app, and would like to display the on-screen keyboard when the user taps a textbox in my game. Is there a way to do this while in fullscreen mode? 回答1: Executing osk.exe will pop up the more old-fashioned on-screen keyboard. The Windows 8 touch keyboard will pop up by executing C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe I just figured that out, since I'm working on a fullscreen desktop app that is running on a tablet PC without keyboard

What is the best practice to render sprites in DirectX 11?

亡梦爱人 提交于 2019-12-20 10:23:38
问题 I am currently trying to get used to the DirectX API and I am wondering what is the usual approach to render a sprite in DirectX 11 (e.g. for a tetris clone). Is there a simmilar interface as ID3DX10Sprite , and if not, which would be the usual method to draw sprites in DirectX 11? Edit: Here is the HLSL code that worked for me (the computation of the projection coordinate could be done better): struct SpriteData { float2 position; float2 size; float4 color; }; struct VSOut { float4 position

Why Direct3D application performs better in full screen mode?

醉酒当歌 提交于 2019-12-20 09:15:20
问题 The performance of a Direct3D application seems to be significantly better in full screen mode compared to windowed mode. What are the technical reasons behind this? I guess it has something to do with the fact that a full screen application can gain exclusive control for the display. But why the application cannot gain exclusive control for part of the screen (i.e. window) and have the same performance benefits? 回答1: Here are the cliff notes on how things work underneath. Monitor screen

Capture visual output of a DirectX application - even in background?

三世轮回 提交于 2019-12-20 08:40:03
问题 I need to capture the visual output (like a screenshot) of a DirectX window. Currently, I use this approach. But, when the window is in background, it captures whatever is in front of it. I see that DirectX windows render even when minimized or in background, so this should be possible. But, how? (It also needs to be fast, and it needs to work on Windows XP too, unfortunately...) Edit : I am very busy these days... Don't worry, I'll put the bounty back if it expires. 回答1: To capture Direct3D

Best practices for Alt-Tab support in a DirectX app?

邮差的信 提交于 2019-12-20 08:24:30
问题 When writing DirectX applications, obviously it's desirable to support the user suspending the application via Alt - Tab in a way that's fast and error-free . What is the best set of practices for ensuring this? Things that need to be addressed include: The best methods of detecting when your application has been alt-tabbed out of and when it has been returned to. What DirectX resources are lost when the user alt-tabs, and the best ways to cope with this. Major things to do and things to

What's the difference between WARP drivers,reference drivers and software drivers?

喜你入骨 提交于 2019-12-20 05:58:02
问题 In DirectX 11, there are four types of drivers: D3D_DRIVER_TYPE_HARDWARE D3D_DRIVER_TYPE_REFERENCE D3D_DRIVER_TYPE_SOFTWARE D3D_DRIVER_TYPE_WARP The first one is hardware driver which is widely known to us. and we always use this one in our program. The last 3 are WARP dirver, reference driver and software driver. from the document on MSDN, I am not quite clear what's the differences of the 3 kinds of drivers, the same is they are all implement by software, but, what's the differences? 回答1:

How to enable more debugging info for DirectX variables in VS 2008?

佐手、 提交于 2019-12-20 05:52:47
问题 I was able to enable debugging info for directX variables like LPD3DXMESH etc. Normally it just shows IUnknown and a some pointer value, but if additional debugging is enabled its possible to see more detailed info about the structure. Problem is that I lost the project and now I can't remember how to enable this type of debugging again. Please help me find it again. Thank you! 回答1: First of all, have you enabled DirectX debug mode? If not, go to the DirectX Control Panel under "Microsoft

DirectX Camera to follow based on 3D Model's world Matrix?

给你一囗甜甜゛ 提交于 2019-12-20 05:41:43
问题 I have multiple objects moving about in a 3D space and am looking for ways to, on button press, have the camera snap and follow the object chosen. Is there a way to make use of each object's worldMatrix? (Below is an example of one object. This one is a planet that spins & orbits) //set up matrices for rendering D3DXMATRIX worldMatrixMer, viewMatrixMer, projectionMatrixMer; m_Camera->GetViewMatrix(viewMatrixMer); m_D3D->GetWorldMatrix(worldMatrixMer); m_D3D->GetProjectionMatrix