directx

can't find references Microsoft.DirectX.AudioVideoPlayback and Microsoft.DirectX

邮差的信 提交于 2020-06-24 21:28:49
问题 I've installed .net 4.0 as well as XNA 4.0 . A while ago I used Microsoft.DirectX to play some music and now when I try to redo the work, I can't find the reference. Did the new changes on the platform modify or moved something in the references? 回答1: Visual Studio 2010: right click on project Menu select "Add reference..." select tab "Browse" select directory "C:\windows\assembly\ GAC\Microsoft.DirectX.AudioVideoPlayback The DLL to reference is in that folder. You will need to download and

Right justify text using SharpDX/Direct2D

夙愿已清 提交于 2020-06-01 07:17:58
问题 I have some code to draw some text: var textFormat = new SharpDX.DirectWrite.TextFormat(fontFactory, "Arial", SharpDX.DirectWrite.FontWeight.Bold, SharpDX.DirectWrite.FontStyle.Normal, SharpDX.DirectWrite.FontStretch.Condensed, 16.0f); renderTarget.DrawText("AC", textFormat, textRect, textBrush, DrawTextOptions.NoSnap); The text is drawn starting at the top-left of the target rectangle. Is there any way to right-justify the text? 回答1: The fourth entry for the google search "right justify text

CoCreateInstance of IWICImagingFactory

天涯浪子 提交于 2020-05-16 05:37:50
问题 I am running Visual Studio 2012 on my Windows 7 machine. When I run the SimpleDirect2dApplication found here : http://technet.microsoft.com/en-us/subscriptions/dd940321%28v=vs.85%29.aspx hr = CoCreateInstance( CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&m_pWICFactory) ); the CoCreateInstance fails with a "Class Not Registered" and the ptr to the factory is 0. Any help would be appreciated. 回答1: According to an answer in a Microsoft's forum a breaking change in the

ID3D11Texture2D to ID2D1Bitmap, is it possible?

你离开我真会死。 提交于 2020-05-11 03:04:10
问题 I am working on a extension to a game which only opens a HDC for addon developers to draw on. However, I have exhausted GDI+/Direct2D drawing possibilities that is fast enough for what I want to accomplish - image effects(Additive, Blend, Multiply Blend etc). I am well aware that Direct2D offers a effects toolkit however, that requires a platform update (for Windows 7) and that is not ideal at all. Hence I am left with only Direct3D. MSDN/Google Search offers lots of ways to do D2D -> D3D,

ID3D11Texture2D to ID2D1Bitmap, is it possible?

我怕爱的太早我们不能终老 提交于 2020-05-11 02:59:51
问题 I am working on a extension to a game which only opens a HDC for addon developers to draw on. However, I have exhausted GDI+/Direct2D drawing possibilities that is fast enough for what I want to accomplish - image effects(Additive, Blend, Multiply Blend etc). I am well aware that Direct2D offers a effects toolkit however, that requires a platform update (for Windows 7) and that is not ideal at all. Hence I am left with only Direct3D. MSDN/Google Search offers lots of ways to do D2D -> D3D,

ID3D11Texture2D to ID2D1Bitmap, is it possible?

跟風遠走 提交于 2020-05-11 02:59:14
问题 I am working on a extension to a game which only opens a HDC for addon developers to draw on. However, I have exhausted GDI+/Direct2D drawing possibilities that is fast enough for what I want to accomplish - image effects(Additive, Blend, Multiply Blend etc). I am well aware that Direct2D offers a effects toolkit however, that requires a platform update (for Windows 7) and that is not ideal at all. Hence I am left with only Direct3D. MSDN/Google Search offers lots of ways to do D2D -> D3D,

Windows C++ fast RGBA32 DX texture to RGB24 buffer

馋奶兔 提交于 2020-04-30 08:20:19
问题 If already have a DirectX texture in hand, what is the fast(low CPU utilization) way to get a RGB24 buffer in main RAM from it (skip the A)? Strictly the format is DXGI_FORMAT_B8G8R8A8_UNORM , does this mean ARGB? I'm using https://github.com/bmharper/WindowsDesktopDuplicationSample to capture Windows desktop and the result is to be converted into RGB24 lossless format in main RAM. The existing code copy GPU texture to CPU texture then use memcpy to copy each line of the RGBA32 data to main

NSight Graphics Debugging cannot start

冷暖自知 提交于 2020-04-30 07:43:26
问题 I am trying to debug a HLSL shader in VS2012 using NSight, but it can't start. When I click on "Start Graphics Debugging", it seems like it starts the app for a moment, and then closes it (output windows from NSight shows several "shader loaded"/"shader unloaded" lines). Windows Event log doesn't show anything (except "NVIDIA Network Service" failing to start, but if I understood well, this is something related to updates). On the other hand, if I start GPU Perfomannce analysis, then it runs

NSight Graphics Debugging cannot start

自闭症网瘾萝莉.ら 提交于 2020-04-30 07:43:07
问题 I am trying to debug a HLSL shader in VS2012 using NSight, but it can't start. When I click on "Start Graphics Debugging", it seems like it starts the app for a moment, and then closes it (output windows from NSight shows several "shader loaded"/"shader unloaded" lines). Windows Event log doesn't show anything (except "NVIDIA Network Service" failing to start, but if I understood well, this is something related to updates). On the other hand, if I start GPU Perfomannce analysis, then it runs

Using vertex buffer instancing, how to dynamically change separate instance position?

纵然是瞬间 提交于 2020-04-18 05:36:52
问题 I need to draw million cubes. Cubes has the same vertex array, but may have different scale/position/rotation. Important: they may change their position dynamically, after vertex buffer creation. Some of them should be connected by the line. So I also need to draw lines. Currently I deal with the instancing using constant buffer: VertexShader.hlsl struct VS_INPUT { float4 pos: POSITION; float4 colour: COLOUR; uint InstanceID: SV_InstanceID; } cbuffer ConstantBuffer : register(b0) { float4x4