directx

How can I migrate between versions?

岁酱吖の 提交于 2019-12-06 16:01:44
What are changes from directx 10 to 11? Ive written some code in directx 10 and I want to change it to directx 11. Is this just about quality and I can do it just by changing headrs and dll files or functions and way of coding have been changed? ing. First, I need to say, that nothing will change if you just change your D3D10DoSomething() functions to D3D11DoSomething() . They will do same things. No passive gain. You must use new features explicitly to make your app better. Those features that D3D10 don't have: such as hardware tessellation, compute shader, many many other stuff. To code. So,

How to draw line and font without D3DX9 in DirectX 9?

爷,独闯天下 提交于 2019-12-06 15:23:03
问题 I saw that D3DX9 is not recommended by Microsoft and not shipped with Windows SDK. I would like to adopt. I'm missing my line drawing utility. How can I replace ID3DXLine and ID3DXFont in "new" DirectX9? 回答1: Generally, lines and fonts are sprites. ID3DXLine and ID3DXFont use ID3DXSprite interface under the hood. (Of course, there are other options too, but sprite approach is the most widely used) Drawing sprites So, firstly, you will need either 3rd party or your own sprite renderer.

3D Spaces (Model/World, View/Eye, Projection)

て烟熏妆下的殇ゞ 提交于 2019-12-06 15:22:23
This isn't a question but I was very confused about what 3D space corresponded to what. I was used to hearing Model, View, Projection space but at my job they use World, Eye, Projection. I didn't realize that World and Eye were synonyms for model and view so if anyone has any confusion on this i found the following clarification to help (hopefully it will help you). Local Space : These are the coordinates that make up the 3D model in a rendering program like 3Ds Max or any other. It defines the space of the vertices for the 3D Model itself. Model/World Space : Multiplying local space

Can D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT be passed with D3D_FEATURE_LEVEL_11_0?

只愿长相守 提交于 2019-12-06 13:43:36
MSDN on D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT says: Direct3D 11: This value is not supported until Direct3D 11.1. Does this mean runtime version or feature level? Can I pass the flag to D3D11CreateDevice but only pass feature level 11_0? Is the feature level irrelevant and it just depends on the installed runtime version? What happens if I pass the flag to a DX runtime 11.0? Will it just be ignored silently? Or do I first have to detect the DX runtime version somehow, and then pass the flag only if the DX runtime version is at least 11.1? The 'correct' way to determine if you have the

Recording a live video stream in C#/XNA

雨燕双飞 提交于 2019-12-06 13:30:34
问题 I have a project that renders the web cam stream onto a texture. I was wondering if there was a way, either through DirectX's Audio/Video functionality or through XNA directly where I can record the stream into an avi file format? Thanks in advance for the help. 回答1: Direct show will do exactly what you need through the ICaptureGraphBuilder For a C# wrapper, see: http://sourceforge.net/projects/directshownet/ 回答2: I have used this VideoTexture Class before with success and would recommend you

Is it possible to capture audio output and apply effects to it?

夙愿已清 提交于 2019-12-06 13:27:50
Using .NET and DirectSound I want to be able to take all output sound that is coming from my audio device and apply effects to it. I've had a quick look at the docs on MSDN and there doesn't seem to be any explanation as to how to do something like this. I've read elsewhere that you'd be better off writing a driver to sit in front of your real audio driver and have that do whatever you want with the sound. Any ideas anyone to push me in the right direction? Edit: After a bit more research it looks like the Windows SDK provides a bit of functionality for this sort of thing. Can anyone confirm

Create Swap Chain Failed

ε祈祈猫儿з 提交于 2019-12-06 12:04:17
I am following a DX sample & MSDN reference, but I hit a wall now. I get the HRESULT of E_InvalidArg from D3D11CreateDeviceAndSwapChain(). I know it is the IDXGIAdapter I passed, since it works if I change it to null. I cannot figure out what is wrong with my initialization. Maybe someone with better knowledge knows what I did wrong. Here it is: The vars: vector<IDXGIAdapter1*> vAdapters; IDXGIAdapter1* selectedVAdapter; // Constructor inits this to null Methods: void refreshVideoAdapters(){ IDXGIAdapter1* pAdapter; IDXGIFactory1* pFactory=NULL; uint lastID=0; if(selectedVAdapter){ DXGI

How to handle multi touch in windows phone 8 app

瘦欲@ 提交于 2019-12-06 11:43:56
I can not find an example how to handle multi touch in windows phone 8 app ( in game on c++ and directx ). May be anyone can help me? Thanks! I figured out how to do it. I am a C++ newbie so there may be much better ways to do this, but my way works. (FYI - I wrote an article about this on Nokia's Developer site: http://developer.nokia.com/Community/Wiki/Multi-touch_handling_using_DirectX_C%2B%2B#PointerPoint ) You need to keep track of the PointerId inside of the PointerPoint. I store the PointerId in the OnPointerPressed event in a std::unordered_map. The key (unsigned int) is the PointerId.

Using mem_fun_ref with boost::shared_ptr

爱⌒轻易说出口 提交于 2019-12-06 10:37:58
Following the advice of this page , I'm trying to get shared_ptr to call IUnknown::Release() instead of delete: IDirectDrawSurface* dds; ... //Allocate dds return shared_ptr<IDirectDrawSurface>(dds, mem_fun_ref(&IUnknown::Release)); error C2784: 'std::const_mem_fun1_ref_t<_Result,_Ty,_Arg> std::mem_fun_ref(_Result (__thiscall _Ty::* )(_Arg) const)' : could not deduce template argument for '_Result (__thiscall _Ty::* )(_Arg) const' from 'ULONG (__cdecl IUnknown::* )(void)' error C2784: 'std::const_mem_fun_ref_t<_Result,_Ty> std::mem_fun_ref(_Result (__thiscall _Ty::* )(void) const)' : could not

DirectX11 CreateWICTextureFromMemory Using PNG

北城余情 提交于 2019-12-06 09:20:51
I've currently got textures loading using CreateWICTextureFromFile however I'd like a little more control over it, and I'd like to store images in their byte form in a resource loader. Below is just two sets of test code that return two separate results and I'm looking for any insight into a possible solution. ID3D11ShaderResourceView* srv; std::basic_ifstream<unsigned char> file("image.png", std::ios::binary); file.seekg(0,std::ios::end); int length = file.tellg(); file.seekg(0,std::ios::beg); unsigned char* buffer = new unsigned char[length]; file.read(&buffer[0],length); file.close();