directx

directX creating the swapchain

拜拜、爱过 提交于 2020-01-22 16:21:06
问题 In my book there i code to create swap chain. IDXGIDevice * dxgiDevice = 0; mD3dDevice->QueryInterface( __uuidof( IDXGIDevice ),( void ** ) & dxgiDevice ); IDXGIAdapter * dxgiAdapter = 0; dxgiDevice->GetParent( __uuidof( IDXGIAdapter ),( void ** ) & dxgiAdapter ); IDXGIFactory * dxgiFactory = 0; dxgiAdapter->GetParent( __uuidof( IDXGIFactory ),( void ** ) & dxgiFactory ); dxgiFactory->CreateSwapChain( mD3dDevice, & sd, & mSwapChain ); For this code there is no explanation, i check few mor

directX creating the swapchain

折月煮酒 提交于 2020-01-22 16:20:46
问题 In my book there i code to create swap chain. IDXGIDevice * dxgiDevice = 0; mD3dDevice->QueryInterface( __uuidof( IDXGIDevice ),( void ** ) & dxgiDevice ); IDXGIAdapter * dxgiAdapter = 0; dxgiDevice->GetParent( __uuidof( IDXGIAdapter ),( void ** ) & dxgiAdapter ); IDXGIFactory * dxgiFactory = 0; dxgiAdapter->GetParent( __uuidof( IDXGIFactory ),( void ** ) & dxgiFactory ); dxgiFactory->CreateSwapChain( mD3dDevice, & sd, & mSwapChain ); For this code there is no explanation, i check few mor

Check which version of DirectX is installed

断了今生、忘了曾经 提交于 2020-01-21 05:16:28
问题 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

How to save bmp file from ID2D1Bitmap

限于喜欢 提交于 2020-01-16 11:10:06
问题 I am trying to create the bmp file from the live running video using Kinect. I am developing an application which is running the live video on top of that to place an image. The IDE which I am used is Visual Studio Professional 2010. The code I am developing in C++ using win32. . I want to save the video along with the overlayed image. Now I am using ID2D1Bitmap for displaying the bitmap in overlayed manner. But I have to retrieve the byte* data from the video with overlayed image. I am

Extract frame from VOB(DVD) file

依然范特西╮ 提交于 2020-01-16 08:08:10
问题 I need to generate thumbnail from video files, i m using IMediaDet to get frame from video, it not working for (*.vob) file DVD, how can i get thumbnail from DVD in C# .. 回答1: It isn't clear whether or not you are using an unencrypted DVD. For the sake of this answer, I'm going to assume you are. IMediaDet uses the Sample Grabber filter to perform most of its operations. Unfortunately the Sample Grabber doesn't support the VIDEOINFOHEADER2 format as indicated here. Some MPEG-2 decoders will

check registry for DirectX End-User Runtime

瘦欲@ 提交于 2020-01-16 03:55:09
问题 I am creating an installer which checks the registry for softwares/ components that are not installed and installs them if needed. The problem I am having is that the software I need to run launches correctly if I install the latest DirectX End-User Runtime from the DirectX End-User Runtime web installer on a fresh copy of Windows(http://www.microsoft.com/en-au/download/details.aspx?id=35). The error I get if not installed is "The program can't start because d3dx9_43.dll is missing from your

How to give a mesh, vertex like self lighitng?

安稳与你 提交于 2020-01-15 15:48:07
问题 How we can give any complex mesh, vertex like self lighting. I tried increasing light ambient, material ambient, but as soon as it goes far it starts disappearing. I want that to be visible at whatever distance it is at. I have tried getting vertex from a cylinder then putting color in it, works fine for colors but fails at distance. have a look here and have a look at this too 来源: https://stackoverflow.com/questions/5700001/how-to-give-a-mesh-vertex-like-self-lighitng

Do DirectX Compute Shaders support 2D arrays in shared memory?

…衆ロ難τιáo~ 提交于 2020-01-15 10:18:06
问题 I want to use groupshared memory in a DirectX Compute Shader to reduce global memory bandwidth and hopefully improve performance. My input data is a Texture2D and I can access it using 2D indexing like so: Input[threadID.xy] I would like to have a 2D array of shared memory for caching portions of the input data, so I tried the obvious: groupshared float SharedInput[32, 32]; It won't compile. The error message says syntax error: unexpected token ',' . Is there any way to have a 2D array of

How to efficiently write pixels to the screen with Direct2D

萝らか妹 提交于 2020-01-15 04:01:05
问题 I have a array of pixels (m_pixels) that I want to render to the screen using Direct2D. The array contains 10,000 elements (100 rows of 100 pixels). The code below loops over the pixels and draws them to the screen as 10x10 rectangles. Is there a more efficient way of performing this operation? How can I add a GaussianBlur effect to the pixels/image? m_d2dContext->BeginDraw(); m_d2dContext->Clear(ColorF(0.0f, 0.0f, 0.0f)); // Render m_pixels // m_pixels is updated by the solver directly

Add Watermark to Capture stream

坚强是说给别人听的谎言 提交于 2020-01-14 06:13:09
问题 I am using DirectX.Capture and Direct Show. Using existing project http://www.codeproject.com/KB/directx/directxcapture.aspx?msg=2490488 want to add water mark is it possible? if yes how? 回答1: To add a watermark in the recorder video, you would have to insert some watermarking filter into the graph that does capture and recording. In my apps, I am doing it via sample grabber filter which enables me to access every video frame as it is captured from the input source. Beware though: the frame