If you get an error code, please take a screenshot with DirectX, today’s instructions should help.
Approved: Fortect
Not The Product You Are Looking For? Answer The Other Questions, Called DirectX Full-screen Screenshot, Or Ask Yourself.
With Detours, you can instrument calls similar to calls to Direct3DCreate9
, IDirect3D9 :: CreateDevice
, and IDirect3D9 :: Present
in which you activate The following are the processes required to set up and capture an image.
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
answered Dec 26, 2009 at 0:03
65,700
This is really a C # example of connecting parts of IDirect3DDevice9 using DLL injection and connecting functions using EasyHook (for example, Microsoft Detours). Is this related to the functioning of FRAPS?
This allows you to record the screen in windowed mode rather than fullscreen, and uses the back buffer, which should be much faster than trying to get data from the front buffer.
A useful C ++ helper library used for Definitions of methods of the IDirect3DDevice9 object to add at runtime.
Update: For DirectX 10/11 see screenshots and overlays for D3D 9, 10 and 11
answered May 15 ’10 at 2:02
1252
This is the piece of code I used as a test, of course it works.
The width and height are definitely the size of the SCREEN in windowed mode, not the size of the windows. So am I, because they are set to 1280 x 1440, not the size of the window I’m rendering into.
You will need to replace mEngine-> getDevice () with multiple choices to get your IDirect3DDevice9 as well. I just pasted this code into any d3d app that I needed to test easier. But I can assure you that it will capture the output of this application,as well as any other d3d application running at the same time.
Oh, suppose I have this particular D3D9, as you didn’t say, I’m not sure about d3d10 or 11
IDirect3DSurface9 * surface;mEngine-> getDevice () -> CreateOffscreenPlainSurface (width, height, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, & surface, NULL);mEngine-> getDevice () -> GetFrontBufferData (0, surface);D3DXSaveSurfaceToFile ("c: tmp output.jpg", D3DXIFF_JPG, surface, NULL, NULL);Surface-> Share ();
Answered 26 ’09 at 14:54
28.3k
Of course there is open source software like fraps: taksi, although it seems outdated
answered Dec 26 ’08 at 11:20 09 at 13:23
251
Here’s a discussion of how Fraps works. It’s not that easy.
Any trick that interferes with reading another device’s external buffer, directx, may, I suppose, sometimes work best with uninitialized memory for luck.
Dec 29 ’09 only replied at 7:05
4,779
Following J99’s answer, I ended up working on the code for windowed and fullscreen modes. This is also done for D3D9.
IDirect3DSurface9 * surface; D3DDISPLAYMODE; pDev-> GetDisplayMode (0, & mode); // pDev is my husband and my * IDirect3DDevice // we can capture the entire screen, // Hence the size and height up todo not match the current selection mode pDev-> CreateOffscreenPlainSurface (mode.Width, mode.D3DFMT_A8R8G8B8, height, D3DPOOL_SCRATCH, & surface, NULL); if (pDev-> GetFrontBufferData (0, surface) == D3D_OK) if (bWindowed) // global config variable // Display the client area in office coordinates // May need transformation to support multiple screens RECT r; GetClientRect (hWnd, & r); // hWnd is also a handle to our window POINT p = 0, 0; ClientToScreen (hWnd, & p); SetRect (& r, p.x, p.y, p.x + r. Right, p.y + r. Below); D3DXSaveSurfaceToFile (szFilename, D3DXIFF_JPG, surface, NULL, & r); another D3DXSaveSurfaceToFile (szFilename, D3DXIFF_JPG, floor, NULL, NULL); Surface-> Share ();
Looks like the format and settings of the CreateOffscreenPlainSurface pool should be exactly the same.
answered Oct 2, 2012 at 11:33 am
495
Speed up your computer's performance now with this simple download.
Click the app you want to take a screenshot of.Press t + Print Screen.Open MS-Paint.Press Ctrl + V.This will most likely insert a screenshot of the window displayed in Paint.
Press this button to quickly release the side and volume down buttons.
This method is often very useful when you are taking a lot of screenshots. While holding down the Windows Technique button, press the PrtSc key on your keyboard. The full screen screenshot will be clipped in the Pictures> Screenshots folder. One way to access this folder is to always find the folders quickly: Screenshot.