Questions tagged [slimdx]
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.
65
questions
1
vote
1
answer
87
views
Polygon draw order issue
I'm working on a software and I'd to move the rendering API from SlimDX to SharpDX. I've done that but I noticed that the solid polygon are not drawn correctly i.e., even if the polygon is at the back ...
1
vote
1
answer
68
views
3D Texture Only interpolates on Y-Axis
I'm having trouble wrapping my brain around what actually is the issue here, but the sampler I'm using in my volume renderer is only interpolating the 3D texture along the Y axis.
I roughly followed (...
0
votes
1
answer
648
views
SlimDX Direct3D10 Sprite stretches with window size
I'd like to draw a sprite bitmap with SlimDX Direct3D10, but I'm stuck at this problem, where I can see my image on screen, but it gets stretched depending on the window size.
The issue looks like ...
0
votes
1
answer
2k
views
1
vote
1
answer
336
views
How do I toggle color writes in SlimDX 11/Direct3D 11 with FeatureLevel 10?
I'm having trouble setting the RenderTargetWriteMask field of a RenderTargetDescription struct. I simply want to toggle color ...
0
votes
1
answer
268
views
Why does PIX crash while creating render target views in my D3D11 application?
I'm trying to use PIX to debug my Direct3D11 application. PIX crashes and gives the following stack trace:
...
0
votes
0
answers
302
views
SlimDX 11: Setting Multiple Render Targets
I'm using SlimDX 11 in my managed Direct3D application. I would like to implement deferred shading. I'm having trouble when I try to set a depth stencil surface and multiple render targets at the same ...
1
vote
1
answer
185
views
FileNotFoundException while using ShaderbyteCode.CompilefromFile method
I'm currently learning SlimDX, I want to load a Shader from tutorial which is named "triangle.fx" and it is in a folder called "FX",everything is in my solution.
When I'm typing this line of code:
<...
1
vote
2
answers
813
views
Why does the 3D window go blank on resuming from sleep/lock?
I have a 3d window hosted inside a WPF program. This is written in C#, using SlimDX. It uses a D3DImage subclass to support dx10 & dx11 rendertargets, like this site recommends: http://jmorrill....
2
votes
1
answer
203
views
DirectX is the camera a point or a plane?
I've built an application in SlimDX using an orbit camera. Currently I treat the position of the camera as a singular point in space. I've noticed my projections from 3D space to 2d space are off by ...
0
votes
1
answer
111
views
How to apply two pixel shaders in one go
Is there any possible way to apply two pixel shader simultaneously in directx-9.
For example I am having two pixel shaders one to apply ripple effect and another to modify the color of the texture ...
1
vote
1
answer
807
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 ...
-1
votes
1
answer
959
views
Why does this code to render a triangle in SlimDX only show a black screen?
Here is the code:
...
0
votes
1
answer
526
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
1
answer
359
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
1
answer
664
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 ...
5
votes
2
answers
6k
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:
...
8
votes
1
answer
357
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 am ...
0
votes
1
answer
493
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 ...
2
votes
1
answer
294
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)
...
0
votes
1
answer
93
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 ...
2
votes
1
answer
1k
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
1
answer
440
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
1
answer
952
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
1
answer
842
views
2
votes
1
answer
2k
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
2
answers
797
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...
<...
4
votes
1
answer
733
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:
...
1
vote
1
answer
2k
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 that,...
4
votes
2
answers
7k
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
1
answer
809
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
1
answer
169
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.
http://msdn.microsoft....
0
votes
1
answer
5k
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
1
answer
2k
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 it....
0
votes
1
answer
836
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
2
answers
1k
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:
http://pastebin.com/...
8
votes
2
answers
4k
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
1
answer
2k
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
1
answer
1k
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
3
answers
2k
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
1
answer
166
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
1
answer
528
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 "Hello,...
0
votes
3
answers
3k
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, ...
3
votes
2
answers
4k
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
2
answers
7k
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
3
answers
379
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 ...
10
votes
1
answer
5k
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
2
answers
5k
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 ...
4
votes
1
answer
3k
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:
...
1
vote
1
answer
159
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 ...