Questions tagged [sharpdx]

SharpDX is an open-source project delivering the full DirectX API under the .Net platform, allowing the development of applications with high performance 2D and 3D graphics rendering as well as real-time sound.

SharpDX is an open-source project delivering the full DirectX API under the .Net platform, allowing the development of applications with high performance 2D and 3D graphics rendering as well as real-time sound.

For more information, see http://sharpdx.org/

656 questions
3
votes
1 answer

Creating a dummy HWND to pass to Direct3D

I'm trying to translate the D3DImage sample to pure C# with SharpDX. Direct3D requires a HWND to initialize, and this is how it's done in C++: WNDCLASSEX g_wc = { sizeof(WNDCLASSEX), CS_CLASSDC, nullptr, 0L, 0L, GetModuleHandle(nullptr),…
Asik
  • 21,506
  • 6
  • 72
  • 131
3
votes
0 answers

Optimal vertex buffer handling in DirectX11

I'm writing some code that is drawing 2D sprites using D3D11 (SharpDX for WinRT apps). All of this is working, however it is not fast. Here's a bit of the code I'm using: // Setup local variables var d3dDevice =…
Real World
  • 1,593
  • 1
  • 21
  • 46
3
votes
1 answer

How can I play a .wav file using SharpDX DirectSound in a C# WPF project?

I want to be able to precisely control the timing of .wav files played in my program. I also want to be able to play more than one .wav file at the same time. The SoundPlayer was not good enough because I can't play two sounds at once, and even when…
Jackson Dean Goodwin
  • 617
  • 3
  • 11
  • 20
3
votes
2 answers

Mapping corners to arbitrary positions using Direct2D

I'm using WIC and Direct2D (via SharpDX) to composite photos into video frames. For each frame I have the exact coordinates where each corner will be found. While the photos themselves are a standard aspect ratio (e.g. 4:3 or 16:9) the insertion…
roufamatic
  • 18,187
  • 7
  • 57
  • 86
3
votes
0 answers

using SharpDX in Metro to do Image-Processing

I'm working on SharpDX to do image processing on Metro. Now I successfully get the data in WICBitmap, and copy it to WriteableBitmap to show the image in Image Control. But now the problem is, I need to put the data from a WriteableBitmap(not from a…
Han
  • 51
  • 5
3
votes
5 answers

Exiting the SharpDX RenderLoop

SharpDX has a RenderLoop that runs a given delegate in the render loop: RenderLoop.Run(m_RenderForm, () => { // Do stuff here to render things... } What I need to do is exit the render loop somehow. RenderLoop.Run(m_RenderForm, () => { if…
Cylindric
  • 5,858
  • 5
  • 46
  • 68
2
votes
1 answer

How do I override the paint method of a Winforms control to make it paint to a texture?

I am trying to integrate Winforms with a SharpDX project, in order to use Winforms (and eventually WPF via HostElement) in my 3D app. I need to create or configure a Control or Form such that I can: a. Render it to a texture (that I can display as…
sebf
  • 2,831
  • 5
  • 32
  • 50
2
votes
0 answers

How to read ID3D11Debug::ReportLiveDeviceObjects output?

These are two different reports from the same d3d11 application, for the first report I used RLDO_DETAIL as flag and RLDO_IGNORE_INTERNAL for the second : ---- D3D11_RLDO_DETAIL ---- D3D11 WARNING: Live ID3D11Device at 0x000001EBC400FF20, Name:…
2
votes
1 answer

c# SharpDX ScaleEffect Interpolation question

i've been using this wonderful library for low impact screen recording software however im at a point where i need to use a DirectX Scale Effect to scale the image down with anisotropic filtering. I can create the effect just fine and set up most of…
Eugen M
  • 51
  • 1
  • 6
2
votes
1 answer

C# texture2d how to convert to cpu image

How would you convert a Directx11 Texture2d into an image on the cpu that I can process? I have tried searching the issue and google comes up with unity answers that use exclusive API's or the answers reflect to System.Drawing.Texture2
Mike Hawk
  • 21
  • 2
2
votes
2 answers

How to map DirectInput (sharpDX) device to it's corresponding HID (C#)

What I need is a way to find out the curresponding HID of a SharpDX.DirectInput DeviceInstance. What I have on DirectInput side is : ProductId -> 00060079-0000-0000-0000-504944564944 (always the same) InstanceId ->…
2
votes
1 answer

Texture2d from Byte array Sharpdx

I am a C#, SharpDX and Directx newbie. Please excuse my ignorance. I am following up on an old post: Exception of Texture2D.FromMemory() in SharpDX code. It was very helpful. My goal: Build a Texture2d from softwarebitmap. Make the texture…
George_m
  • 21
  • 2
2
votes
0 answers

Can I use a FIFO for SourceReader?

I am trying to follow what the author did in this question, but I would like to decode nal units from a FIFO or pipe, so that I can enqueue nal units in to buffer from a producer thread (basycally a thread that receives nal units from different…
Ottavio Campana
  • 4,088
  • 5
  • 31
  • 58
2
votes
0 answers

SharpDX Texture2D from DataStream

I want to show one of my WPF applications in VR and ran into a little problem when rendering the overlay texture directly from a datastream. The texture isn´t displaye correctly. First of all I render my WPF Application into a Bitmap and save it…
2
votes
1 answer

Marshaling arrays into constant buffer for pixel shader not working as expected

I'm trying to learn Direct3d programming using SharpDX and am working through various examples on the internet as well as Frank Luna's Introduction to 3D Game Programming with DirectX 11. Currently I'm trying to pass multiple light sources…
Johan
  • 35
  • 1
  • 4