Questions tagged [sharpdx]

SharpDX is an open-source project delivering the full DirectX API under the .Net platform, allowing the development of applications with high performance 2D and 3D graphics rendering as well as real-time sound.

SharpDX is an open-source project delivering the full DirectX API under the .Net platform, allowing the development of applications with high performance 2D and 3D graphics rendering as well as real-time sound.

For more information, see http://sharpdx.org/

656 questions
4
votes
2 answers

Quaternion from Tait-Bryan angles

I am writing a camera with SharpDX and rotate it with the help of a quaternion. The camera rotation is set with pitch (X rotation), yaw (Y rotation) and roll (Z rotation), so called "Tiat-Bryan" angles (these are not Euler angles which would have…
Ray
  • 7,940
  • 7
  • 58
  • 90
4
votes
1 answer

Sampling a texture within vertex shader?

I'm using DirectX 11 targeting Shader Model 5 (well actually using SharpDX for directx 11.2 build) and i'm at loss with what is wrong with this simple shader i'm writing. The pixel shader is applied on a flat high poly plane (so there are plenty of…
Ronan Thibaudau
  • 3,413
  • 3
  • 29
  • 78
4
votes
0 answers

SharpDX Bitmap.FromWicBitmap wrong result

I'm using SharpDX for my WinRT application. For the pixel shaders I try to load the image with this code private Bitmap LoadImage(System.IO.Stream stream) { var bitmapDecoder = new SharpDX.WIC.BitmapDecoder( this.deviceManager.WICFactory, …
Re Flex
  • 41
  • 1
4
votes
3 answers

MeasureString in sharpDX

we are developing windows 8 metro app using SharpDX. Now we have to declare set of string within a Rectangle. For that we trying to find out the Font width and height using SharpDX.DrawingSizeF. for example: Windows.Graphics g; Model.Font…
Maniarasu
  • 362
  • 5
  • 15
4
votes
1 answer

Save to png in SharpDx

I develop Metro-application with SharpDx under Direct2D. I drew some picture using deviceContext. How I can save my picture to png-file?
AndreyAkinshin
  • 18,603
  • 29
  • 96
  • 155
3
votes
2 answers

SharpDX, DirectWrite and Windows Forms

Can one render text using DirectWrite to a PictureBox in a WinForm app? I'm using SharpDX and have gone through the DirectWrite samples trying to build the simplest working case I can. I created a Form and added only a pictureBox to it. Then the…
vocalionecho
  • 301
  • 4
  • 9
3
votes
3 answers

Loading textures with SharpDX in Windows Store App

I have converted my C# game from OpenTK (OpenGL) to SharpDX (DirectX) and have it up and running from Visual Studio 2010. I also have it up and running from Visual Studio 11 in Metro, in the Windows 8 Developer Preview. However, the Metro build is…
msedore
  • 91
  • 2
  • 10
3
votes
1 answer

What is a quick way to scale down an image using SharpDX hardware acceleration in C#?

I'm trying to scale down large images (~ 23k x 1k) to be displayed in winforms. The current way I'm scaling the images is taking too long, which is why I want to use the GPU through SharpDX (C#) to improve performance. What would be a good way to do…
Hawksm278
  • 31
  • 1
3
votes
1 answer

Is it possible to migrate to HelixToolKit.WPF.SharpDX from HelixToolKit.WPF in C#

I have written a significant part of my codes in C# using HelixToolKit.WPF, but its performance is not satisfied. Thus, I decide to change it to HelixToolKit.WPF.SharpDX library and use the power of DirectX 11 to enhance its performance. In this…
3
votes
1 answer

Deadlock on AcquireNextFrame() and ReleaseFrame() randomly in Desktop Duplication API

I'm attempting to write an application for recording the Windows desktop to a video file. I'm making use of the desktop duplication API and the Media Foundation API. More specifically I'm using the SinkWriter class from Media Foundation. I'm…
3
votes
1 answer

HLSL modify depth in pixel shader

I need to render an image (with depth) which I get from outside. I can construct two textures and pass them into a shader with no problem (I can verify values sampled in a pixel shader being correct). Here's how my HLSL looks like: // image…
chainerlt
  • 215
  • 3
  • 8
3
votes
1 answer

Draw SVG graphic with SharpDX

I am using SharpDX in C# for Direct2D. For SVG I found that SharpDX supports it: https://github.com/sharpdx/SharpDX/pull/954/files#diff-ab708c02d6344a22d99b1c932b72cc12 How can I render SVG graphics? For example I want to draw this whale:…
Jenny
  • 572
  • 4
  • 16
3
votes
1 answer

SinkWriter.WriteSample() fails with E_INVALIDARG

I'm using MediaFoundation with SharpDX in order to encode video files from desktop duplication frames. I'm creating a texture and capturing the screen. Then this texture is passed to MFCreateVideoSampleFromSurface, which is called once. /* creating…
user2541873
3
votes
1 answer

Running a DX11 compute shader with SharpDX - cannot get results

I am trying to run a compute shader and get the resulting texture using SharpDX. From what I understood, I need to: 1. Create a texture to set as an output to the shader. 2. Set the above texture as an unordered access view so I can write to it. 3.…
stormbreaker
  • 848
  • 13
  • 22
3
votes
1 answer

Using an Xbox One controller in Visual Studio?

I am trying to get input from an Xbox One controller, but I just cannot get it to work. I tried SharpDX, but I could not add "SharpDX.XInput" after installing SharpDX from NuGet. I also tried XInputDotNet, and added the reference to…
Betterjakers
  • 77
  • 2
  • 8