![]() ![]() With simple windows it will not work as it should. Use only mode ctDDraw removing screens with video players, etc. Height, hWinDC, 0, 0, SRCCOPY ) Ĭreate an instance to class, set in the property TargetHandle - HWND desired window, set the mode of the screen capture (ctWinapi, ctDDraw, ctDirectX), then in the button click method of class call ActivateClient then call GetScreenShot and in the field will Bitmap is a screen window. Direct3D 8.0 also eliminated DirectDraw as a separate API. GetTargetPosition (out left, top : integer ) ![]() GetTargetDimensions (out w, h : integer ) Width * BitsPerPixel div 8 ) īitBlt (Bitmap. LockRect (LockedRect, ARect, D3DLOCK_NO_DIRTY_UPDATE or D3DLOCK_NOSYSLOCK or D3DLOCK_READONLY ) ĬopyMemory (BMP. Height, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, pSurface, nil ) CreateDevice (D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, GetDesktopWindow, D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DPP, g_pD3DDevice ) PD3D := Direct3DCreate9 (D3D_SDK_VERSION ) GetDirectXData ( ) įillChar (d3dpp, SizeOf (d3dpp ), 0 ) įlags := D3DPRESENTFLAG_LOCKABLE_BACKBUFFER Handle, 0, 0, W, H, DesktopDC, x, y, SRCCOPY ) GetDC (DesktopDC ) = DD_OK thenīitBlt (Bitmap. CreateSurface (SurfaceDesc, Surface, nil ) = DD_OK then SetCooperativeLevel (GetDesktopWindow, DDSCL_EXCLUSIVE or DDSCL_FULLSCREEN or DDSCL_ALLOWREBOOT ) = DD_OK thenįillChar (SurfaceDesc, SizeOf (SurfaceDesc ), 0 ) Im looking into shaders right now, thanks (trying to figure out how to bind the palette texture to the sampler uniform variable). If DirectDrawCreate ( nil, DirectDraw, nil ) = DD_OK then CPU usage increases dramatically in 32-bit DirectDraw vs. Property TargetHandle : HWND read FTargetHandle write FTargetHandle ![]() Property CatchType : TCatchType read FCatchType write FCatchType Procedure GetTargetPosition (out left, top : integer ) Procedure GetTargetDimensions (out w, h : integer ) Procedure GetTargetRect (out Rect : TRect ) TCatchType = (ctWinapi = 0 ,ctDirectX = 1 ,ctDDraw ) ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |