sharpdx

How to plot 3D colored points with Helix toolkit

…衆ロ難τιáo~ 提交于 2019-12-23 23:40:20
问题 I create a simple 3D viewer with Helix toolkit. I want to plot 3D points which is colored. I referred to the sample project "SimpleDemo" which is contained in the Example folder ( HelixToolkit.Wpf.SharpDX ). This is my XAML: <hx:PointGeometryModel3D x:Name="points" Geometry="{Binding Points}" Transform="{Binding Model1Transform}" Color="{x:Static sdx:Color.White}" /> And drawing core is below. var points = new PointGeometry3D(); var col = new Color4Collection(); var ptPos = new

Find out DirectX Version

和自甴很熟 提交于 2019-12-23 04:04:08
问题 how can you detect if the directx version on a windows 7 machine is 11 or 11.1 ? preferably using a .NET language maybe via PInvoke or SharpDX? 回答1: Just try to create a device with a specific feature level (along with other parameters). In native code (use one of the D3D11CreateDevice* functions) . If function will not succeed - feature level is not supported. To make it easier, we usually pass array of feature levels, and then, if device is not nullptr , we can check which one is highest

Send feedback/effect to joystick from .net

南楼画角 提交于 2019-12-22 10:48:28
问题 Thanks to this answer https://stackoverflow.com/a/13734766/637142 I am able to know when a button is pressed or when the steering wheel is rotated. Now my question is how do I send an effect to the device? For example when I am playing a game if I crash the wheel will vibrate. How could I make the steering wheel vibrate? I belive what I need to do is to Start() an effect (http://sharpdx.org/documentation/api/t-sharpdx-directinput-effect). The SharpDX.DirectInput.Joystick class does not seem

DirectX Image texture quad displays underlying controls color where it is transparent

柔情痞子 提交于 2019-12-22 01:08:17
问题 I'm trying to draw a texture on texture as show in the image below. Yellow circle Image: Green circle Image: As shown in the above image of penguins, i'm trying to render another image as texture which is shown by green and yellow circles. The image is transparent where purple is shown. Purple is color of the underlying control on which the texture is drawn. The order of rendering is: 1. render penguins 2. Render green circle 3. render yellow circle 4. render green circle Now I'm not sure as

DirectX: World to view matrix - where is my misconception?

拜拜、爱过 提交于 2019-12-21 20:32:34
问题 I'm starting with DirectX (and SharpDX, therefore programming only in C#/hlsl) and am trying to build my own camera class. It should be rotatable, allow forward and backward moving and also "sideways" movement (the classical first person movement often mapped to A and D, plus up and down in my case). For easier bugfixing model and world space are the same in my case, perspective projection is not yet implemented, as is rotating the camera, and my camera is supposed to look in the positive Z

Quaternion from Tait-Bryan angles

孤街醉人 提交于 2019-12-21 20:27:24
问题 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 an XYX rotation, and not XYZ). I am using a left-handed coordinate system: X+ is rightwards, Y+ is upwards, Z+ is downwards the screen. If I rotate around X ("pitching"), positive values make the camera look downwards. If I rotate around Y ("yawing")

D3DImage and SharpDX flickering on slow hardware

浪子不回头ぞ 提交于 2019-12-21 05:16:18
问题 I am using the SharpDX.WPF project for the WPF abilities, it seems like an easy to understand low-overhead library, compared to the Toolkit that comes with SharpDX (which has the same issue!) First: I fixed the SharpDX.WPF project for the latest SharpDX using the following: https://stackoverflow.com/a/19791534/442833 Then I made the following hacky adjustment to DXElement.cs, a solution that was also done here: private Query queryForCompletion; public void Render() { if (Renderer == null ||

SharpDX 2.5 in DirectX11 in WPF

人盡茶涼 提交于 2019-12-21 03:44:19
问题 I'm trying to implement DirectX 11 using SharpDX 2.5 into WPF. Sadly http://directx4wpf.codeplex.com/ and http://sharpdxwpf.codeplex.com/ don't work properly with SharpDX 2.5. I was also not able to port the WPFHost DX10 sample to DX11 and the full code package of this example is down: http://www.indiedev.de/wiki/DirectX_in_WPF_integrieren Can someone suggest another way of implementing? 回答1: SharpDX supports WPF via SharpDXElement. Take a look in the Samples repository at the Toolkit.sln -

SharpDX render in WPF

。_饼干妹妹 提交于 2019-12-20 10:44:09
问题 I want to draw lines as fast as possible. For that reason I implemented a method using InteropBitmap. This works quite good. Next step was to compare with ShardDX. Basically what I want to do is: Running the following code in a BackgroundWorker. This does inform the WPF about an update of WIC. I found out that this code (creating all needed for ShapeDX and draw line) takes about 10ms longer than doing the same using InteropBitmap. My question now is simply, how to speed this up? Can I change

How can I play multiple sounds at the same time using SharpDX in WinRT?

吃可爱长大的小学妹 提交于 2019-12-19 10:57:07
问题 I am trying to make a musical instrument type of application. The problem I am having is that a new sound will only play if the old one is finished. I would like to be able to play them simultaneously. This is how my code looks like: First, the MyWave class which simply holds an audio buffer and some other info: class MyWave { public AudioBuffer Buffer { get; set; } public uint[] DecodedPacketsInfo { get; set; } public WaveFormat WaveFormat { get; set; } } In the SoundPlayer class: private