directx

Check which version of DirectX is installed

天涯浪子 提交于 2019-11-30 22:11:37
As per the title, how can I check which version of DirectX a user has installed? Checking the FeatureLevel isn't enough, as my application can run on feature level 10.0, but requires that DirectX 11.1 be installed. Why this is not a duplicate: How to code to get direct X version on my machine in C#? The first answer in this question says "If Windows 7, DirectX = 11, if Windows Vista, DirectX = 10". This is wrong, as Vista supports both DirectX 10 and 11 and Windows 7 supports DirectX 11 and 11.1. The second answer references a registry key which only applies to DirectX 9 and lower. Even on a

The desktop capture with DirectX does not work

自作多情 提交于 2019-11-30 21:34:16
Because processing was slow by D3DPOOL_SCRATCH, I wrote the desktop capture program to reference for the report on the Internet. However, a result is a pitch-black picture. Is this the result of a console program or is there any other cause? #include <stdio.h> #include <Windows.h> #include <d3d9.h> void main() { CoInitialize(NULL); LPDIRECT3D9 d3d9; LPDIRECT3DDEVICE9 d3ddev; d3d9 = Direct3DCreate9(D3D_SDK_VERSION); int ww = GetSystemMetrics(SM_CXSCREEN); int wh = GetSystemMetrics(SM_CYSCREEN); HWND hwnd = GetDesktopWindow(); D3DPRESENT_PARAMETERS d3dpp; ZeroMemory(&d3dpp, sizeof(d3dpp)); d3dpp

How to query GPU Usage in DirectX?

拥有回忆 提交于 2019-11-30 21:25:48
How to query GPU Usage in DirectX? Specifically DirectX 11. If someone ever did it, could you provide me the code snippet? Vertexwahn Process Hakcer is able to do this. See here: http://processhacker.svn.sourceforge.net/viewvc/processhacker/2.x/trunk/plugins/ExtendedTools/gpumon.c?revision=4927&view=markup A similar question has been asked here: How do you calculate the load on a nvidia (cuda capable), gpu card? 来源: https://stackoverflow.com/questions/16376218/how-to-query-gpu-usage-in-directx

What can cause D3D11CreateDevice() to fail with E_FAIL?

隐身守侯 提交于 2019-11-30 20:39:10
I'm invoking D3D11CreateDevice() with the following code: ID3D11Device* md3dDevice; ID3D11DeviceContext* md3dImmediateContext; D3D_DRIVER_TYPE md3dDriverType = D3D_DRIVER_TYPE_HARDWARE; createDeviceFlags = D3D11_CREATE_DEVICE_DEBUG; HRESULT hr = D3D11CreateDevice( 0, md3dDriverType, 0, createDeviceFlags, 0, 0, D3D11_SDK_VERSION, &md3dDevice, &featureLevel, &md3dImmediateContext); However, the result stored in HRESTUL hr is E_FAIL . The console has the following output: First-chance exception at 0x7590b9bc in Init Direct3D.exe: Microsoft C++ exception: _com_error at memory location 0x0049ec64..

Sending keys to a DirectX Game

时光怂恿深爱的人放手 提交于 2019-11-30 20:03:46
问题 I got into a little trouble sending keys. It seems like when ever I want to send keys It doesn't work. I'm thinking about sending alphabetic characters such as T to bring the chat up from example, but If I write It to the enum, nothing happens whenever I use them. Any ideas? [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)] public static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); [DllImport("user32.dll", SetLastError = true)] public static

FXC : error X3501: 'main': entrypoint not found

若如初见. 提交于 2019-11-30 19:25:59
I am following an example book called: Introduction to 3D Game Programming with DirectX 11 It is all written in VS2010. I would like to try using VS2013... It is an example project for Windows Desktop Program I have a program with the following in it (including some other files as part of common use): color.fx //*************************************************************************************** // color.fx by Frank Luna (C) 2011 All Rights Reserved. // // Transforms and colors geometry. //*************************************************************************************** cbuffer

OpenGL/DirectX: How does Mipmapping improve performance?

走远了吗. 提交于 2019-11-30 19:20:37
I understand mipmapping pretty well. What I do not understand (on a hardware/driver level) is how mipmapping improves the performance of an application (at least this is often claimed). The driver does not know until the fragment shader is executed which mipmap level is going to be accessed, so anyway all mipmap levels need to be present in the VRAM, or am I wrong? What exactly is causing the performance improvement? Andon M. Coleman You are no doubt aware that each texel in the lower LODs of the mip-chain covers a higher percentage of the total texture image area, correct? When you sample a

Is DirectX on Java possible?

不羁的心 提交于 2019-11-30 18:21:20
Is there an easy way to use DirectX in Java? In particular, DirectX's video APIs. I know that C# might be a more natural choice, but I have my devious reasons for wanting to do something so perverse. I don't know about easy, but you could always use JNI to load the DirectX libs and invoke the methods. Using something like Swig you could auto-generate a lot of the code. Not sure how workable something like that would be though. There seems to be a standard API about dealing with 3D inside Java. It probably uses some kind of accelerating technology, may be even DirectX. But I'm not sure about

How to code to get direct X version on my machine in C#? [duplicate]

核能气质少年 提交于 2019-11-30 17:51:50
问题 This question already has answers here : Check which version of DirectX is installed (2 answers) Closed 6 years ago . I want to know when the user clicks the menu item he should be able to know the direct X version installed on his machine? I want to code this in C# in VS2008. What should i write in the menu item click event? Am a beginner in C#,so dont know where to start from.. can anybody please help? Thanks.. 回答1: This may help: .NET How to detect if DirectX 10 is supported?. Edit: Below

Is there a SharpDx Template, for a Windows Universal App?

微笑、不失礼 提交于 2019-11-30 16:05:08
I tried to write a game for Windows and Windows Phone 8.1, with SharpDx. But when I try, to add a Windows Phone 8.1 Version to my already existing Windows 8.1 Game, I get a few errors and the App doesn't work. Now the question: Is there an SharpDx Template in XNA Style for a Windows Universal App, like the Template I got for my only Windows 8.1 Game (from the SharpDx Visual Studio Extension)? No there isn't, yet. What you should do is open an issue ( https://github.com/sharpdx/SharpDX/issues ) and ask for the feature to be implemented. But you can still get started while waiting for it to be