directx

is screenshotting by DirectDraw faster than GDI way?

让人想犯罪 __ 提交于 2019-12-11 15:48:26
问题 just to save some time, probably anybody tried this or saw somewhere related info. asking about DirectDraw and not about DirectX because I need to support Win2000 and up, and I cannot install DirectX on target PC 回答1: tried capturing by Direct3D and compared with GDI way. Results are not unambiguous. On my Win7 x64 with rather good video card D3D way shows ~2 times performance boost. On my WinXP 32bits laptop with not-integrated but old video card D3D works much much much longer. On another

DirectX9 Texture of arbitrary size (non 2^n)

丶灬走出姿态 提交于 2019-12-11 14:17:49
问题 I'm relatively new to DirectX and have to work on an existing C++ DX9 application. The app does tracking on a camera images and displays some DirectDraw (ie. 2d) content. The camera has an aspect ratio of 4:3 (always) and the screen is undefined. I want to load a texture and use this texture as a mask, so tracking and displaying of the content only are done within the masked area of the texture. Therefore I'd like to load a texture that has exactly the same size as the camera images. I've

Transparency on two rectangles in DirectX, one behind another - I see the background of window instead the second texture

放肆的年华 提交于 2019-12-11 13:55:56
问题 I have an DirectX 11 C++ application that displays two rectangles with textures and some text. Both textures are taken from TGA resources (with alpha channel added). When I run the program, I get the result: What's wrong? Take a closer look: The corners of the rectangles are transparent (and they should be). The rest of textures are set to be 30% opacity (and it works well too). But, when one texture (let's call it texture1 ) is over another ( texture2 ): The corners of texture1 are

16 byte alignment issue

馋奶兔 提交于 2019-12-11 13:53:58
问题 I am using DirectXMath , creating XMMatrix and XMVector in classes. When I call XMMatrixMultiply it throws unhandled exception on it. I have found online that it is an issue with byte alligment, since DirectXMath uses SIMD instructions set which results in missaligned heap allocation. One of the proposed solution was to use XMFLOAT4X4 variables and then change them to temporary XMMatrix whenever needed, but it isn't the nicest and fastest solution imo. Another one was to use _aligned_malloc ,

Making a program timer-based rather than frame-rate dependent?

孤人 提交于 2019-12-11 12:55:35
问题 I have a game engine to work on as part of a class. Currently, its rendering is frame-rate dependent and one requirement is to move to a timer-based dependency. I am not sure how to determine where it is relying on frame-rates. I'm not sure what to look for. I realize I'm going to need to somehow incorporate a timer (GetTickCount?) to accomplish this, but I'm not sure how frequent to update that, either. I'm not looking to be handed code, just some helpful guidelines possibly? 回答1: Imagine

What DirectX components are retained in Windows 8 SDK?

喜夏-厌秋 提交于 2019-12-11 12:49:15
问题 Background : I've developing in Visual Studio 2013 and targeting .Net 4.5, running on Windows 7. I've been trying to get DirectX to run in a WPF context and was referred to SharpDX, and to a sample program using it: http://sharpdxwpf.codeplex.com/SourceControl/latest#SharpDX.WPF.sln When I tried to build it I got errors because 'd3dcompiler_43.dll' was missing. I fixed that by explicitly downloading the DirectX End User Runtimes (https://www.microsoft.com/en-us/download/details.aspx?id=8109)

D3DCompiler Unresolved Extern

旧街凉风 提交于 2019-12-11 12:38:02
问题 I'm having the following problem linking a project in Visual Studio 2012. I call a function from Effects11.lib, but I receive the following error when linking: 1>Effects11.lib(EffectAPI.obj) : error LNK2019: unresolved external symbol _D3DCompileFromFile@36 referenced in function _D3DX11CompileEffectFromFile For some reason it can't seem to link with D3DCompiler. Here is the set of auto linked libraries in the project: #pragma comment(lib, "Effects11.lib") #pragma comment(lib, "d3d11.lib")

CPU Usage JavaFX

孤街浪徒 提交于 2019-12-11 12:21:26
问题 I got some problems by using JFX Applications. On my local developing system(Linux) my application got a cpu usage about 0-2%. When I install and run my application on the customer windows vm system, the cpu usage is much higher, about 50-70%. This phenomenon occurs only on a VM System. If i run the application on a local windows system everything runs fine. Therefore i guess it is related to the vm graphic adapter and his configuration. But the customer says there is no graphic adapter

Python3 move mouse in DirectX games

痴心易碎 提交于 2019-12-11 12:09:43
问题 I'm trying to build create a script that does a few action inside an DirectX game. I've got everything working exept for moving the mouse. Is there any module avalable that can move the mouse, for windows (python 3) Thanks! 回答1: I used pynput once in Python 2.7. I just checked under Python 3.7 and it moves the cursor alright. Sample code from linked source: from pynput.mouse import Button, Controller mouse = Controller() # Read pointer position print('The current pointer position is {0}'

directX directInput Keyboard throws E_accessdenied

落花浮王杯 提交于 2019-12-11 12:04:31
问题 I am trying to work with DirectInput keyboard, and my code is throwing a weird error. I can go through the creation, and setting of everything and they all return S_OK, but when I try to run HRESULT hr; hr = m_pDIKeyboard->GetDeviceState( sizeof(keyBuffer), (LPVOID)&keyBuffer ); hr comes back as (hex address) "access code is invalid", and when I do a check for if(FAILED(hr)) it comes back as E_ACCESSDENIED there are no errors (or warnings for that matter) on the keyBuffer, or any part of the