directx

DirectX Partial Screen Capture

蹲街弑〆低调 提交于 2019-12-02 15:58:36
问题 I am trying to create a program that will capture a full screen directx application, look for a specific set of pixels on the screen and if it finds it then draw an image on the screen. I have been able to set up the application to capture the screen the directx libraries using the code the answer for this question Capture screen using DirectX In this example the code saves to the harddrive using the IWIC libraries. I would rather manipulate the pixels instead of saving it. After I have

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

余生颓废 提交于 2019-12-02 15:30:35
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 avoid in application architecture for purposes of alt-tab support. Any significant differences between

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

可紊 提交于 2019-12-02 15:15:20
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. To capture Direct3D windows that are in the background (or moved off screen), I believe you have the following options: Inject

Directx changes

三世轮回 提交于 2019-12-02 11:58:27
问题 i have a problem with win8 and directx library. i have directx jun 2010 i added its d3dx11.lib and .h files but it doesnt work and says library not found. i found hte link bellow that says you can work with win8 sdk instead of directx libraries and d3dx.... libraries are not supported anymore. http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275%28v=vs.85%29.aspx i found in vs2012 there is a project that builds directx proggram but when i made a project with it it wasnt like any

why D3DXCreateCylinder is not creating a cylinder?

六眼飞鱼酱① 提交于 2019-12-02 11:25:10
I am trying to make a ball trail. rBallPos is correctly updating. Following code is not working creating a cylinder as ball's trail. How to solve it? LPD3DXMESH /*ID3DXMesh*/ ppMeshCylinder = NULL; hr = D3DXCreateCylinder(g_d3d_device,0.1f,0.1f,0.1f,1,1,&ppMeshCylinder,0); hr is FAILED here also hr != D3D_OK D3DXMATRIX cylinder, cylinder2, cylinderRotate, cylinderTrans; D3DXMatrixRotationX(&cylinderRotate, 1.5f); D3DXMatrixTranslation(&cylinderTrans, rBallPos.fX, rBallPos.fY, rBallPos.fZ); D3DXMatrixMultiply(&cylinder, &cylinderRotate, &cylinderTrans); g_d3d_device->SetTransform(D3DTS_WORLD,

DirectX Partial Screen Capture

左心房为你撑大大i 提交于 2019-12-02 10:31:19
I am trying to create a program that will capture a full screen directx application, look for a specific set of pixels on the screen and if it finds it then draw an image on the screen. I have been able to set up the application to capture the screen the directx libraries using the code the answer for this question Capture screen using DirectX In this example the code saves to the harddrive using the IWIC libraries. I would rather manipulate the pixels instead of saving it. After I have captured the screen and have a LPBYTE of the entire screen pixels I am unsure how to crop it to the region I

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

我怕爱的太早我们不能终老 提交于 2019-12-02 08:41:39
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? Reference device and Software device http://www.gamedev.net/topic/631456-whats-the-difference-between-d3d

Copy Texture to Texture

守給你的承諾、 提交于 2019-12-02 08:29:18
I've done 2 programs to use Shared Resources, running on SlimDX & DirectX10. One program will display the shared texture on a 3D mesh. The 2nd program will load an image as texture. So far I need to pass the shared handled everytime the texture is update from a new image. Now, is there a way that I can initialize a fixed size shared texture (Texture2D), then everytime when I load a new image, all I need to do is load it as texture, then copy it to the existing texture. This way the shared handle would not change, and I can save some overhead of passing the shared handle. For DirectX9, I do

E_INVALIDARG: An invalid parameter was passed to the returning function

我们两清 提交于 2019-12-02 07:55:07
I'm trying to make simple SlimDX example to test some performance vs GDI and unfortunately I got stuck on the very beginning. I've created simple Console Application in VS2010 and added this code to programs main method: // 0. STEP SlimDX.Direct3D10.Device device = new SlimDX.Direct3D10.Device(DriverType.Hardware, DeviceCreationFlags.BgraSupport); SlimDX.Direct2D.Factory factory = new SlimDX.Direct2D.Factory(); // 1. STEP Texture2DDescription textureDesc = new Texture2DDescription(); textureDesc.Width = 512; textureDesc.Height = 512; textureDesc.MipLevels = 1; textureDesc.ArraySize = 1;

how to convert XMMATRIX to D3DMATRIX in DirectX 9?

戏子无情 提交于 2019-12-02 07:38:34
问题 I learn DirectX (DirectX 9) from www.directxtutorial.com and using visual studio 2012 in windows 8. d3dx9 (d3dx) replace by other header like DirectXMath, therefore I replaced all that is needed, but there is a problem - convert XMMATRIX to D3DMATRIX. The problem code (The problem written - / problem! /): void render_frame(void) { // clear the window to a deep blue d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); d3ddev->BeginScene(); // begins the 3D scene // select