Questions tagged [slimdx]

SlimDX is an MIT-licensed, open-source framework that allows developers working with managed languages like C# and IronPython to leverage DirectX and many of Microsoft's other gaming-related multimedia APIs.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

SlimDX render going transparent with window (whilst using LWA_COLORKEY)

Hello I was making a transparent window combined with SlimDX so I could draw stuff on my screen. However I noticed that the flag LWA_ALPHA lagged alot so I switched over to LWA_COLORKEY which worked ...
  • 41
0 votes
1 answer
101 views

SlimDx и CreateOffscreenPlainSurfaceEx в wine

I'm trying to run application with playing video. My problem is that i'm receive null while: surface = Surface.CreateOffscreenPlainEx(_device, width, height, useRgb ? Format.X8R8G8B8 : ...
0 votes
1 answer
42 views

How I can add transparency to simple vertex objects?

How I can add transparency to simple vertex objects in Direct3D? I used information from here with no result: https://learn.microsoft.com/ru-ru/windows/win32/direct3d9/vertex-alpha I initialize device ...
  • 121
1 vote
1 answer
428 views

Joystick Coordinates

Hi all I need your help using open TK works on dot net framework 4.5 using Xaml I figured that out. using the following code. I want to replicate it on a windows form but open TK doesn't like forms. I ...
0 votes
0 answers
168 views

I want to upgrade my code changes from DirectX9 to DirectX11 (i.e.SlimDx.Direct3D9 to SharpDx.Direct3D11)

I am first time working on DirectX, I find difficulty in upgrading the code from DirectX9 to DirectX11. Unable to get the code similar in DirectX 11 since lot of changes from DirectX9 to 11. Like ...
  • 1
0 votes
0 answers
385 views

What can I use instead of picturebox to real time streaming in c # winform?

When I stream with the picturebox, there is a decrease in performance. I'm looking for a library that supports 4k 30fps. I think Opengl will support it. I shared my code below. I need a higher ...
1 vote
1 answer
85 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 votes
1 answer
2k views

How to get a screenshot from the background window DirectX

I was looking for examples of how to make a screenshot of an inactive window, but I did not find it. I want to take a screenshot of the game that works in the window, and not in full screen mode. ...
1 vote
0 answers
220 views

Scrolling Tile Grid with SlimDX Direct2D

I am writing a tile based topdown 2D game and would like the tiles to 'scroll' on the screen when the player moves. For performance reasons, I would like to 'shift' the image from the previous frame, ...
0 votes
1 answer
229 views

How to get IntPtr to a native directx11 struct?

I'm trying to create (and fill) a D3D11Buffer in c++, pass a pointer to the buffers memory via interop to c# in order to read from that buffer using slimdx - no copies of the buffer via cpu should be ...
3 votes
2 answers
8k views

Using DirectInput with XBOX One controller and window focus on Windows 10

I am trying to use DirectInput to capture XBOX One controller input signals. I am tying it to a C# WinForms application. The issue I am having is: When the form has focus, it captures inputs just fine....
  • 12.2k
2 votes
1 answer
795 views

C# Take window/desktop screenshot using SlimDX

I am new to SlimDX and I've heard that there is a way to capture screenshots using this library. The reason I want to use SlimDX is that I want to capture screenshots much faster than Graphics....
  • 757
0 votes
1 answer
180 views

Capture System.Diagnostics.Debug Output in a WCF application

I have a WCF console application that includes the SlimDX library. SlimDX outputs a log using the 'Write' method of System.Diagnostics.Debug. I am currently not able to view this log in the console. I ...
  • 691
0 votes
0 answers
217 views

Rendering a WinForm window to a SlimDX Device

I have lately been working on an overlay program and now I've been trying to find a good way to design my overlay as a Windows Form, then just programatically add in the the right information into an ...
  • 193
0 votes
1 answer
258 views

SlimDX: limit the frame rate for lower cpu usage

I am making a 2D game engine using SlimDX (DirectX 9), however Im facing two issues that are linked together, fluctuating frame rates (quite high frame rate though) and high cpu usage. The frame rate ...
0 votes
0 answers
96 views

Drawing with SlimDX on window created by CreateWindowEX

What i want to do: Use CreateWindowEx to make a new transparent, fullscreen window. Pass the Handle to SlimDx Draw onto that window with SlimDX My current code: This is my CreateWindowEx Function: ...
0 votes
1 answer
261 views

Capturing a region with SlimDX

So I'm trying to capture a region using SlimDX. What I mean by this is that I'm not looking to capture from [0,0] to [1920,1080]. Preferably I want to pass a Rectangle object that holds the ...
  • 569
4 votes
1 answer
361 views

SlimDX stops loading big textures after a while

My app from time to time initializes a bunch of DirectX stuff and loads scenes, sometimes containing some large textures (up to 200–300 MB per texture). At first, everything works fine, but after a ...
0 votes
1 answer
393 views

Is DirectInput capable of telling WHICH axes are present on a stick?

I am currently writing a .Net DirectInput wrapper DLL to allow event-based reporting of stick input from other languages (I am using AutoHotkey). I currently use SharpDX to read stick data, but ...
0 votes
1 answer
394 views

SlimDX and Multiple Architectures

I am trying to build a project that can be built in both x64 and x86. I am using SlimDX to be the interop to DirectSound. I cannot change this, as it is part of a bigger application. I am trying to ...
  • 1,106
1 vote
0 answers
675 views

How can i send feedback/effect to joystick from C#?

I found this answer but I'm using SlimDX and the answer is using DirectX: Answer with directx Maybe I should install the directx sdk ? If so from where to download it ? What I did so far with my ...
2 votes
1 answer
121 views

Render to texture fails after resize

In a graphic application i am rendering an image to a texture, then i use that texture on a 3d model. My problem is the following: When the application starts everything is fine, but if i resize the ...
  • 321
0 votes
1 answer
111 views

SlimDX Wrong Joystick State on startup

I use SlimDX and DirectInput to handle a XBox 360 Gamepad for Windows. Everything is working fine but I have the following problem: When a button is pressed while starting the application, the button ...
  • 609
0 votes
1 answer
365 views

How to use JNI4NET when your C# library depends on existing managed dll?

My .NET program I want to use in Java depends on SlimDX, a managed wrapper over DirectX. I add it to the project references as normal without hiccup. However, when it comes to using JNI4NET's build....
1 vote
2 answers
486 views

how to lower cpu impact when dealing with slimdx

i am making an app that overlays other d3d games, the app is working perfectly except it has a huge performance impact on the cpu taking 21.4 % of the cpu when rendering only a single line ! i am ...
1 vote
2 answers
685 views

SlimDx Events on button pressed

I am using slimdx to interpret xbox controller button presses. I poll every 200ms to read the xbox button states and all works for me. I use JoystickState state = Joystick.GetCurrentState(); ...
  • 1,391
0 votes
2 answers
433 views

Applying a pixel Shader to a texture within a sprite with SlimDX Direct3D9

So, I am very new to Developing with DirectX, I'm slowly getting there... But! I have this which instantiates the Direct3D9 runtime, creates a device and loads a Pixel Shader. - I can confirm the ...
0 votes
1 answer
687 views

Convert Pixel Buffer to B8G8R8A8_UNorm from 16Bit

So I have, from an external native library (c++) a pixel buffer that appears to be in 16Bit RGB (SlimDX equivalent is B5G6R5_UNorm). I want to display the image that is represented by this buffer ...
1 vote
2 answers
1k views

Convert SlimDX.Direct3D11 Texture2D to .Net Bitmap

Converting an .Net Bitmap to a SlimDx Texture2D works very fast like this: http://www.rolandk.de/index.php?option=com_content&view=article&id=65:bitmap-from-texture-d3d11&catid=16:blog&...
0 votes
1 answer
1k views

Desktop capture using directX 11

I'm trying to capture desktop image using Direct 11 with SlimDX. But I don't know how to get the back buffer with directX 11 for the monitor desktop. I tried this with C# like this.Why doesn't it get ...
2 votes
0 answers
69 views

Windows. C#. XBox360 Controller prevent default Guide Button popup panel and show my own

I want to use XBox360 Controller in my app. I can get user input with SlimDx.dll. But I cant catch 'XboxButton' or 'GuideButton' pressed. I want catch it to prevent showing default panel (see ...
0 votes
1 answer
217 views

SlimDX When Game WindowFullmode Throw Error

DxScreenCapture.cs public class DxScreenCapture { Device d; public DxScreenCapture() { PresentParameters present_params = new PresentParameters(); ...
-1 votes
1 answer
447 views

Drawing scatter plot is too slow with GDI

I am drawing a scatter plot with the help of GDI. But, when there are many lines, it takes about two seconds to draw. I looked into using SlimDX and SharpDX and utilized their 2D. It only decreased ...
0 votes
1 answer
91 views

DirectX10/ShapDX Custom control

I am trying to create custom control with directx10/direct2D output (panel, not a form). I do all rendering in the overriding OnPaint method, however I have read somewhere that it is wrong and ...
0 votes
1 answer
3k views

C# WinForm - SharpDX.Toolkit.Graphics draw 2D Texture

I would like to implement hardware acceleration for a C # WinForms application. Reason is that i have to draw 150 x 720p images and the 5 picturebox control's takes too long (scaling+drawing of images)...
0 votes
1 answer
100 views

Save joystick list

How can I save and load List of SlimDX.DirectInput.Joystick to/from a file? I tried using (Stream stream = File.Open("joys.xml", FileMode.Create)) { var bformatter = new System.Runtime....
0 votes
2 answers
493 views

Transform point coordinates from 3D space to a generic 2D plane in SlimDX

I need to project a SlimDX.Vector3 (X, Y and Z components) in a generic 2D plane (defined with SlimDX.Plane, with 3 Vector3). Please note that the plane is generic, and it is not the screen plane (...
-1 votes
1 answer
366 views

View Projection matrix calculation using slimdx

I'm using slimdx to build a small visualizer, however, i recently stumbled into a problem. When i transform the triangle with the mvp matrix it disappears. Constant buffers are loaded properly ...
  • 321
0 votes
1 answer
174 views

Cannot Clone Bitmap after Stream Disposed

I load a bitmap from a DataStream. I try to return the loaded bitmap from a method, and later use it as a source to clone a new bitmap. Unfortunately, the Clone() call results in an ...
  • 146k
0 votes
1 answer
328 views

Screen Capture in PNG Format Works, but not BMP Format

I'm using the code below to capture the screen with a game running public static Bitmap CaptureScreen() { DxScreenCapture cap = new DxScreenCapture(); var surface = cap.CaptureScreen(); ...
  • 146k
1 vote
1 answer
1k views

C# + SlimDX / XInput - how to poll when button is pressed?

I need to interface with Xbox 360 controllers and my limited knowledge leaves me stuck with C#. I don't want to use XNA (and require users to have it installed) for this simple thing, so I'm using ...
1 vote
0 answers
760 views

Get shared back buffer from SwapChain

I have a WPF application with SlimDX control in it (DirectX 11). I create a SwapChain on init: var description = new SwapChainDescription() { ModeDescription = new ModeDescription(WindowWidth, ...
  • 21
1 vote
0 answers
4k views

Fast real time Screen Capture (60 fps or better)

I have tried using GDI+ and SlimDX to capture the screen. Surprisingly, the good old GDI+ was faster for me, for unknown reasons (averaging 38-50ms for a screenshot). SlimDX is slower, averaging ...
  • 4,065
6 votes
2 answers
1k views

Visual Studio Graphics Debugger omits working pixel shader

I'm programming in C#, Visual Studio 2013 Update 5 RC, and using Direct3D 11 (via SlimDX) to render an animated scene. I was experimenting with unordered access textures in the pixel shader and it ...
0 votes
1 answer
454 views

SlimDX Access Buffer data

I have a Buffer with some of my vertex data. I need to be able to access the data in this Buffer to extract a single vertex from it. I'm trying to do that like this: Surface surface = mBuffer....
  • 1,353
1 vote
0 answers
271 views

Present IMFSample

I'm working on a WPF project that need to use Media Foundation to capture video from webcam. Now I can get IMFsample from webcam everytime I want, I had used SLimDX to get IMFMediaBuffer (get it from ...
1 vote
1 answer
928 views

How to play a wave file using SlimDX.DirectSound?

public partial class Form1 : Form { SecondarySoundBuffer m_DSoundBuffer; DirectSound m_DirectSound; string fileName = @"F:\\guitar-classical-E-octave0.wav"; public void setting() { ...
0 votes
1 answer
1k views

SharpDX.Vector3.Transform method doesn't seem to rotate vector correctly

Here is a simple example program Vector3 eyePos = new Vector3(0, 1, 0); Vector3 target = Vector3.Zero; Quaternion lookAt= Quaternion.LookAtLH(eyePos, target, Vector3.Up); Vector3 newForward = ...
0 votes
1 answer
141 views

Fit image to ShaderResourceView and preserve aspect ratio

I'm loading an image into a ShaderResourceView to be used as a background image. This is what I'm currently using: ShaderResourceView.FromFile(_device, imagepath); It loads the image into the ...
  • 1,058
0 votes
1 answer
258 views

How can I get the Multisampling capabilities of a graphics card with SlimDX in C#?

I want to give the user choices for MSAA options in a game. I want to be able to check which Multisampling options that their machine can provide and display only these ones. The application I am ...

1
2 3 4 5 6