A programming library (known as a "wrapper") enabling the use of DirectX in the .Net framework, thus making it possible to use DirectX in managed code, like C#. The lead developer of SlimDX is Promit Roy.

learn more… | top users | synonyms

1
vote
1answer
68 views

How do I take Direct3D9 full screen using SlimDX?

I'm writing a Direct3D9 application wrapped by SlimDX. I'm trying to take my application full screen but I am having problems. I can reset the device so that it covers the entire screen, however, it ...
0
votes
0answers
12 views

How do I simultaneously capture and play sound with SlimDX/DIrectSound?

Is it possible to simultaneously capture microphone input and play back some other sound, using DirectSound via SlimDX? How?
-1
votes
1answer
57 views

Why does this code to render a triangle in SlimDX only show a black screen?

Here is the code: var elements = new VertexElement[] { new VertexElement(0,0,DeclarationType.Float3,DeclarationMethod.Default, ...
0
votes
1answer
86 views

How do I avoid an infinite loop when testing D3D9 occlusion queries in SlimDX?

I'm creating a Managed DirectX 9 application using SlimDX. I'm trying to utilize occlusion queries in order to cull non-visible geometry found in the scene. The problem I'm having relates to SlimDX's ...
0
votes
0answers
57 views

Trying to render a texture on Windows.Forms.Panels

Using a SlimDX.Windows.RenderForm, I want to dynamically create a texture of a map of the US, copy that texture to 2 other textures, then draw unique radar data onto each texture. Then I will pass ...
1
vote
0answers
61 views

How do I save my programmatically generated Mesh to a .X file in SlimDX? [closed]

The Mesh has been created properly with SlimDX, but Mesh.ToXFile(barMesh, "foo.x", XFileFormat.Text,CharSet.Unicode); throws a NullReferenceException. I checked that barMesh is not null. Inside the ...
0
votes
1answer
91 views

SlimDX and Parsing .X Files

I'm trying to parse a .x file using SlimDX. I can create the XFile object and register templates but I'm having problems with the enumeration object. The enumeration object has a child count of 0 for ...
0
votes
1answer
110 views

How do I handle window resizing in SlimDX?

I'm considering the use of SlimDX in a managed Windows Forms Application. Available with DirectX is DXUT. I use DXUT to handle events such as window resizing and 'lost devices.' How well does SlimDX ...
0
votes
0answers
150 views

Calculating intersection of line segment with view frustum

I want to calculate the intersection of a line segment with the view frustum. Here's what I tried so far. The code works perfectly when the look direction vector is orthogonal to the line. E.g. ...
1
vote
0answers
320 views

How do i define array in shader's constant buffer with C#?

I am using SharpDX to render 3D graphics and i cannot get to work constant buffer in my shader since it contains an array. Currently it looks like this: cbuffer cb0 : register(b0) { matrix ...
8
votes
1answer
282 views

DirectX error with older XP systems

I am a blind programmer, working on an audio game for the blind. I am using SlimDX, and it has been tested on dozens of systems from XP to Win 8.1. My code works on most systems just fine, but I ...
0
votes
1answer
91 views

Determining desktop bounds by D3D9 adapter

I've got a Direct3D 9 application which normally runs full-screen. The user is able to select a display adapter to determine which screen it is shown on. I also offer a Windowed mode which launches ...
2
votes
1answer
117 views

SlimDX: Error while loading Effect

Im trying to load a effect in SlimDX, but I get a error when I try to get the ShaderSignature. The error-code: E_FAIL: An undetermined error occurred (-2147467259) This is my code: ...
0
votes
1answer
51 views

How can I check the shader model capabilities of an adapter?

I'm writing an application that targets Direct3D11 (through SlimDX) and shader model 5. When I'm running it on a system that doesn't have SM5 capable hardware, I will get a NullReferenceException ...
0
votes
1answer
282 views

Game only runs at 60fps in windowed mode with a 120hz monitor?

In fullscreen the game will run at 120fps fine, the correct refresh rate for the monitor, but in windowed mode it only runs at 60fps. If I disable VSync then it runs at thounsands of fps so it's not ...
0
votes
1answer
144 views

Accessing and changing texture data in SlimDX

How can I access and change texture data in SlimDX? I have a Texture2D and a Texture3D and I need to be able to go in and change either a single or group of pixels.
0
votes
1answer
294 views

Drawing text in SlimDX with Directx 11?

How can I draw text to the screen in directx 11 with slimdx? In SlimDX.Direct3D10 there's a font class which can be used but there's no font class in SlimDX.Direct3D11.
1
vote
1answer
235 views

How can I compile SM 3.0 effects in D3D11 in SlimDX?

var bytecode = ShaderBytecode.CompileFromFile("shaders\\testShader.fx", "fx_5_0", ShaderFlags.None, SlimDX.D3DCompiler.EffectFlags.None, null, null, out str); var effect = new ...
2
votes
1answer
516 views

How do you add rotation to particles?

Today I was working on a particle system and I can't figure out how to give the particle billboards a rotation (so to have them spinning clockwise or counter-clockwise while facing the player). I ...
2
votes
2answers
358 views

Unproject mouse position to tile — extremely jumpy position?

I'm trying to unproject the mouse position to get the position on the X-Z plane of a ray cast from the mouse. The camera is fully controllable by the user. Right now, the algorithm I'm using is... ...
3
votes
1answer
390 views

D3DXMatrixDecompose gives different quaternion than D3DXQuaternionRotationMatrix

In trying to solve this problem, I tracked down the problem to the conversion of the rotation matrix to quaternion. In particular, consider the following matrix: -0.02099178 0.9997436 -0.008475631 0 ...
1
vote
1answer
512 views

ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND

I've stared at this for at least half an hour now and I cannot figure out what directx is complaining about. I know this error normally means you put float3 instead of a float4 or something like ...
1
vote
2answers
2k views

Sharing a texture resource from DX11 to DX9 to WPF, need to wait for DeviceContext.Flush() to finish

I'm following these instructions on TheCodeProject for rendering from DirectX to WPF using D3DImage. The trouble is that now that I have no swap chain to call Present() on -- which according to the ...
2
votes
1answer
400 views

How to handle input for both UI and game

So I originally had my input system set up with only the game part in mind. It listens to keyup/down events, marks the key as pressed/unpressed and then when the next update comes around, it sends ...
1
vote
1answer
139 views

Vertex data from a buffer

I'm using a geometry shader to generate polygons for my voxel terrain (marching cubes). The data is output into a buffer using the method shown in the article I link to below. ...
0
votes
1answer
2k views

Changing the culling mode in the HLSL effect

I'm writing a cel-shading effect in HLSL and Direct3D 11, and I need to be able to flip the culling mode on the outline pass of the effect. I know you do this in XNA by setting CullMode to CW or CCW ...
2
votes
1answer
1k views

Question about mipmaps + anisotropic filtering

I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more than a solid green color with a black grid overlayed on top of ...
0
votes
1answer
347 views

Why do I get an exception when playing multiple sound instances?

Right now, I'm adding a rudimentary sound engine to my game. So far, I am able to load in a WAV file and play it once, then free up the memory when I close the game. However, the game crashes with a ...
1
vote
2answers
631 views

DirectX Flicker

I'm using DirectX 9 via SlimDX (C#). My screen flickers a lot during rendering. I dug a little deeper and see that the surface is being cleared early. Here's an example: ...
7
votes
2answers
1k views

Calculating a quaternion so a bone points in a specified direction

In an attempt to solve this question, I decided to figure out the absolute (world space) directions of each joint in the source pose (as normalized unit vectors), and then rotate the joints of the ...
0
votes
1answer
746 views

E_FAIL: An undetermined error occurred (-2147467259) when loading a cube texture

I'm trying to implement a skybox into my engine, and I'm having some trouble loading the image as a cube map. Everything works (but it doesn't look right) if I don't load using an ...
4
votes
1answer
562 views

Per-vertex position/normal and per-index texture coordinate

In my game, I have a mesh with a vertex buffer and index buffer up and running. The vertex buffer stores a Vector3 for the position and a Vector2 for the UV coordinate for each vertex. The index ...
2
votes
3answers
1k views

Tutorials for Managed DirectX development? [closed]

Are there any good tutorials, for someone new to DirectX development? I'd like to use the SharpDX library in a project, but am completely new to this sort of graphics programming. I'm looking for a ...
1
vote
1answer
126 views

Drawback of using multiple bind flags

As far as I understand Direct3D 11 I have to specify certain BindFlags in order to use a resource in a specific stage of the pipeline. From my experience some combinations are more common like ...
3
votes
1answer
437 views

Learning to code first game, few questions on basic game development and 3D

I've been programming for a while, and I'm concurrently learning how to make a basic game and slimdx, and wanted to talk to someone to hopefully get a few pointers. I've read that Tetris is the ...
0
votes
3answers
2k views

Adapting DirectX samples to SlimDX

I'm trying to learn DirectX and SlimDX but I'm having a terrible time getting started. I'm taking the Triangle tutorial and trying to add color and transformations. Starting with controlling color, ...
2
votes
2answers
1k views

2D overlays in 3D environments

For a 2D overlay in a 3D environment using DirectX, is the 2D overlay still coded as a surface in 3d always positioned in front of the camera? I haven't tried this yet but I imagine that technique ...
5
votes
2answers
4k views

Is using SharpDX or SlimDX easier than using DirectX directly from C++? [closed]

I decided to learn to program in DirectX yesterday, and, not being a huge C++ fanatic, went looking for a .Net wrapper. After reading about SlimDX and SharpDX, I decided I liked what the SharpDX ...
1
vote
3answers
212 views

Extracting blend values from uint32 not working as expected

I have the following shader configuration code : uint gBlendValue = 0xffffff00; Terrain.Effect.GetVariableByName("gBlendValue").AsScalar().Set(gBlendValue); And I have the following shader code : ...
10
votes
1answer
4k views

Is SharpDX mature enough to adopt yet or should I just start using SlimDX right now?

I'm about to stop my game-project in XNA because from what I can gather it's development is coming to an end (and it's already behind current technology). Therefore, I need to adopt a new framework or ...
4
votes
2answers
2k views

How can I draw dashed or dotted lines with a pixel shader?

I am trying to draw the 2D graphics (like line, polyline, polygon etc.) using Direct3D for drawing I am using LINE_LIST. Now I want to make the lines thicker and apply patterns to the line as ...
0
votes
0answers
519 views

Anti-aliasing with Direct2D and Direct3D Interoperability

I am trying to create a CAD drafting application that uses Direct2D to draw all the 2D graphics and uses Direct3D for all the 3D graphics like engine or machine etc. I am using Direct2D and Direct3D ...
4
votes
1answer
2k views

How do I create a CPU read/write buffer in SlimDX (what are the legal combinations of Usage and CPUAccess flags)?

Currently, I create a vertex buffer in SlimDX like so: SlimDX.Direct3D11.BufferDescription Description = new SlimDX.Direct3D11.BufferDescription(); Description.BindFlags = ...
1
vote
1answer
140 views

How to prevent a certain textured quad from the effect of the pixel Shader at the run time in slimdxdirect3d9 or directx9?

I am having a video and and image slide show being rendered simultaneously. Both video and the image is being rendered by the help of texture and two different quads. Video is being rendered on the ...
0
votes
1answer
1k views

How to resize an image texture according to the size of a sprite in directx9 or slimdxDirect3d9?

I want to know that is there any way of resizing our texture to the size of a sprite in slimdx direct3d9 or directx9. That is if my image size is 1024x768 and sprite size is 500x500, how can i resize ...
3
votes
2answers
2k views

What is the “DirectX for Managed Code Update”?

I came upon this site while looking for information about working with DX in managed code and saw that MS released something containing a 'DirectX for Managed Code Update'. This sounds promising but ...
1
vote
0answers
2k views

Directshow VMR9 Allocator presenter present image problem [closed]

I am working with DirectShow for video playback and trying to get the video displayed on a D3D9 texture via SlimDX. I am using IVMRSurfaceAllocator9, IVMRImagePresenter9 for getting a surface from the ...
3
votes
1answer
664 views

Why do Pool.Default D3D volume textures take memory from my process?

I am working on a Direct3D rendering application that uses a lot of texture RAM. I notice that if I allocate a Pool.Default volume texture: _texture = new VolumeTexture(device, size.Width, ...
0
votes
2answers
520 views

DirectX 10 - determining if hardware device is available

I am writing an offline renderer using SlimDX and Direct3D 10 that will need to be run on machines without graphics cards (servers). On these machines, I'll be using the WARP software renderer. Is it ...
1
vote
1answer
191 views

Where is ID3D10EffectShaderResourceVariable::SetResourceArray in SlimDX?

I don't know if I'm just not looking in the right place, but I can't find ID3D10EffectShaderResourceVariable::SetResourceArray anywhere in SlimDX. Anyone have any idea how I should be calling this?