Questions tagged [managed-directx]

Tools and techniques to use DirectX through managed code. Managed DirectX is also known as MDX.

65 questions
15
votes
3 answers

Why this code throws System.ExecutionEngineException

Background: I am using DirectX 9.0 Managed Libraries to transform arrays of 3d points to 2d screen coordinates. For speed I use the UnsafeNativeMethods to do all the transformations. The Problem: If my custom line clipping function is used my…
tbridge
  • 1,754
  • 1
  • 18
  • 35
7
votes
4 answers

Recommended way to work with audio in .NET applications?

I'm trying to get started with a simple audio application under .NET 3.5 (preferably in VB.NET, but will happily use C#). What I'd like to do is: Continuously record audio from (the default) Windows audio input device in 8-bits-per-sample PCM…
mdb
  • 52,000
  • 11
  • 64
  • 62
5
votes
1 answer

Jerky animation when scrolling image in WPF using SharpDX

I am trying to smoothly scroll some images across a window using DirectX11 via SharpDX in a WPF application. A bit of background: The images are signal returns, varying by time, that have been loaded from a file and loaded into D3D as a texture…
Matt
  • 687
  • 5
  • 17
4
votes
1 answer

Quick code to get a WPF Visual to DirectX Texture (performance wise)

Well, the problem is simple, I have something rendered on a WPF Visual. I want to get it to on a DirectX Texture. At present, I using the following code to get the job done. var bmp = new System.Windows.Media.Imaging.RenderTargetBitmap(bound.Width,…
Trainee4Life
  • 2,203
  • 2
  • 22
  • 38
3
votes
1 answer

Getting hardware GUID for video adapter in C#

I'm developing a launcher application for a 3D game on Windows. The configuration "ini" file requires the user to specify the hardware GUID for the desired device, as in, the Device Identifier GUID returned by dxdiag.exe. I'm trying to list the…
alaska.alex
  • 183
  • 1
  • 8
3
votes
1 answer

Managed DirectX as prerequisites

I am packaging an vb.net application which uses managed DirectX and I am not using vs deployment project etc. Now, I want to check managed directX 9 C is installed on the client or not. If not download the directX managed from the web. What is the…
DotNET
  • 309
  • 2
  • 7
3
votes
0 answers

WPF doesn't always repaint when using WindowsFormsHost

I have a simple application which is hosting a Managed DirectX Control using WindowsFormsHost. I've overridden the paint methods in the Control to prevent flicker: protected override void OnPaint(PaintEventArgs e) { if (this.Visible == true) {…
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
3
votes
1 answer

Managed Direct3D: Lock entire Vertex Buffer

I have a Mesh object returned from Mesh::TextFromFont and I am trying to set the color of each vertex. I am calling the vertex buffer's Lock function like this: mesh->VertexBuffer->Lock(0, LockFlags::None); However, this call throws an exception.…
Agnel Kurian
  • 57,975
  • 43
  • 146
  • 217
2
votes
1 answer

System.Convert.ToDouble(decimal) giving two different answers

I've got a very odd issue. I run this in the immediate window: ?(System.Convert.ToDouble(2458963.229671001113318401517D)) 2458963.229671001 Which is what I expect! Then, later on in my application, after initializing Managed DirectX, I get the…
2
votes
2 answers

Error calling C++/CLI constructor from C#

I am trying to save and restore state by using a StateBlock in SlimDX via the following snippet: StateBlockMask mask = new StateBlockMask(null) { RasterizerState = true }; var sb = new StateBlock(device.Device, mask); Both StateBlockMask and…
erik
  • 1,238
  • 3
  • 12
  • 23
2
votes
1 answer

C#: Unable to create DirectX device. Neither Hardware type or Software type works

I'm trying to create a DirectX device through the following code: Caps deviceCapability; int deviceAdapter = Manager.Adapters.Default.Adapter; try { deviceCapability = Manager.GetDeviceCaps( deviceAdapter, DeviceType.Hardware); } catch…
Japtar
  • 1,125
  • 1
  • 14
  • 24
2
votes
2 answers

SlimDX DirectInput Initialization

I've recently swapped from MDX 2.0 to SlimDX, using Direct3D 11, but I'm struggling to implement keyboard and mouse controls. In MDX you can use keyb = new Microsoft.DirectX.DirectInput.Device(SystemGuid.Keyboard); keyb.SetCooperativeLevel(this,…
Nick Udell
  • 2,420
  • 5
  • 44
  • 83
2
votes
1 answer

DirectX Z-Buffer Issue

Does anyone knows what might be causing the weird artifacts I am seeing in my C# Managed DirectX application. Here is a screenshot of the problem I am having: What you are looking at is some terrain with a flat plane under it. To the left you…
tbridge
  • 1,754
  • 1
  • 18
  • 35
2
votes
2 answers

What are some great books for beginning game programming?

I've been programming for a little over 2 years now, and I want to get started with graphics programming and make some simple games to start with. A lot of the books I've looked at for learning directx assume you know the basics of it, which I…
2
votes
2 answers

Imposing limitations on 4-point image transformation

I'm working on a 4-point image transformation for an application. The user would either drag each corner around to create a valid quadrilateral shape, or use its "bounding box" to resize it vertically, horizontally, and proportionally. So far, I…
Japtar
  • 1,125
  • 1
  • 14
  • 24
1
2 3 4 5