slimdx

VMR9Allocator (DirectShow .NET + SlimDX)

I was trying to convert and run the VMR9Allocator sample for DirectShow .NET with SlimDX instead of MDX. I got an exception when it reach this line return vmrSurfaceAllocatorNotify.SetD3DDevice(unmanagedDevice, hMonitor) In the AdviseNotify method in Allocator.cs. The exception is "No such interface supported", and the hr return was ...

SlimDX - how did you find it?

Has anyone out there used the SlimDX library for something serious (e.g., commercial) work? How did you find the library? Is it production-ready? ...

Efficient Line Drawing In Direct3D (Transformation2D?)

Background: I'm using the SlimDX C# wrapper for DirectX, and am drawing many 2D sprites using the Sprite class (traditionally from the Direct3DX extension in the underlying dlls). I'm drawing multiple hundreds of sprites to the screen at once, and the performance is awesome -- on my quad core, it's using something like 3-6% of the proce...

How to rotate, scale, and translate a matrix all at once in C#?

Okay, this is something that should be a simple matrix question, but my understanding of matrices is somewhat limited. Here's the scenario: I have a 1px by 1px sprite that I want to scale by some amount x and y (different amounts on each side), and then I want to rotate that sprite by some angle, and then I want to be able to precisely...

Drawing 2D with SlimDX

Hello I'm having trouble rendering correctly sprite with SlimDX. It draws a little scaled just like .NET Drawing DrawImageUnscaled does. I'm not using any transformations. Init: Vector2 position; Sprite sprite; Size size; Texture texture; sprite = new Sprite(Device); string filename = /*some bitmap*/; using (Image b = Bitmap.FromFile(f...

SlimDX (DirectX10) - How to change a texel in Texture?

Hi, I try to change the texels of a Texture which is already loaded. My assumption was to use the Texture2D::Map and UnMap functions, but there is no change when I change the data of given DataRectangle. I need a simple example like, creating a texture of 128x128 with a gradient from black to white from each side. Thx ps: A Direct3D...

D3DImage using DX10

Is it possible to use DirectX 10 (I am using SlimDX) with WPF's D3DImage? The only examples and docs I can find only show using DX9 surfaces. ...

Capturing audio input from mic using SlimDX

Hello, VS 2008 SlimDX march 2009 I am using the SlimDX to capture the input audio and display it in a progress bar. I have a backgroundworker that will do the capturing in the background thread and update the progress bar. However, I am getting into the problem of what to value to use as the value to update the progress bar. Everyt...

SlimDX Directx 9 problem

I am getting the Following problem when i try to initialize the directx SlimDX.Direct3D9.Direct3D9NotFoundException was unhandled Message="Direct3D 9 was not found. Reinstalling DirectX may fix the problem code: Direct3DEx m_d3dEx = new Direct3DEx(); I checked the version of Directx installed on my PC via dxdiag utility ...

2D Triangle in SlimDX

How to draw a triangle using SlimDX's Direct2D interface given triangle vertices are given in pixel coordinates? ...

SlimDX Assembly Reference

I've installed SlimDX but the assembly reference does not come up as a choice in Visual Studio, and I cannot for the life of me find out where SlimDX has installed itself! Any help would be greatly appreciated! Thank, Mikey ...

What to use for C# SlimDX Game UI

I am currently developing a 3d game using C#/SlimDX (The target is Direct3D 9). I've been looking for a suitable Game UI toolkit for a while, but I was unable to make up my mind. The Game UI will be for a roleplaying game, so it'll be fairly complex and will involve quite a few controls (text boxes, inventory grids, list boxes, select b...

Which would be the best 2D graphics library?

Okay, I bet this question might have been asked dozens of times before, but at the end of the day, I am still confused. I am working on a charting/plotting application. My application will also have WinForms controls. Edit: Actually it's little bit more than a simple charting application. I need to plot hundreds of symbols on the plot....

D3D Performance comparison, shaders vs built in shading

Hi there. I have a running 3D engine built in D3D (via SlimDX). To avoid interupting the rendering pipeline I have batched together many objects with the same material into bigger meshes (to reduce state switching). This have worked well and gives a good performance level for my need. The issue I am running into is that I, during runti...

GC collecting...what?

I am trying to optimize my engine (C# + SlimDX) to make as less allocations as possible (to prevent the GC from firing too often) using as guide a profiler that gives me where the garbaged object are generated. Its going pretty well (going down from like 20 MB garbaged every 5s to 8 MB garbaged every 1 minute and half (yep, it was very l...

StopWatch returns Integer after DirectX Device creation

The question is pretty "simple". I have an engine that can work with both DirectX9 and DirectX10 with SlimDX in C#. I use the Stopwatch class to time the game and test speed of some routine. Strangely exactly after the creation of the DirectX9 the floating point of the StopWatch go crazy and the GetTimeStamp()/Frequency division returns ...

How to render 3d scene over webcam frame in DirectX?

I'm capturing webcam using AForge so I've every frame as a bitmap. I would like to render some scene over it. Currently I am rendering DirectX (SlimDX) scene over C# Panel control. Is there a possibility to put bitmap to ZBuffer or maybe some other way to achieve it? ...

What is a good code structure for api-independant vertex processing?

Currently working on a 3D media engine using C# and I have come across a little conundrum. I have my rending loop figured out, I got a great plug-in architecture and content management system and even a material pipeline all planned out. Then engine is planned to use DirectX and OpenGL (via 'renderer' plug-ins), along with both APIs' pro...

SlimDX viewports in WPF controls

I am transitioning from WinForms/XNA to WPF/SlimDX because: a) all of the benefits of WPF over WinForms (but learning curve = ouch!) b) I would like to have multiple SlimDX viewports attached to Panels. XNA has 1 "game" screen. c, last and least) DirectX 10 support All of my previous XNA code is in C#. I am having trouble figurin...

What should I do if I were to destroy the surface (Form) I intialiy created the device for and...?

Say I have a SlimDX based game editor. I have a DeviceContext instance which basically controls all states of the device, handles lost device, creates it, etc. The editor does not always have a view-port open where rendering is taking place. Instead it contains various editors, a scene editor, texture viewer/editor, animation editor, ma...