0

I'm working on a UWP C# Bluetooth application with 3d representation view. (of the hand and fingers will receive sensors ST microelectronic WESU)

For the moment, I used windows phone 8 application (desktop and Windows phone) for Bluetooth with the ti sensor tag and DirectX example.

Now I arrived to read computed quaternion from the stmicro wesu sensor with a custom UWP BLE example (originally present in the Windows SDK).

But now that it works fine with ble /sharpdx /uwp and Windows 10. But when I tried now to execute the application on Lumia 640, I have an exception.

The issue is that it uses DirectX 9 and it is not supported in UWP by sharp dx.

The sharp dx team confirmed me that UWP doesn't work with DirectX 9 (core.net if I remember correctly).

I tried to downgrade the version used for the pixel shader and vertax shader as below but it doesn't do the job.

so my question is how can I arrive to run DirectX 9 Under UWP on the Lumia 640?

//
using (var vertexShaderByteCode = ShaderBytecode.CompileFromFile("vertexShader.hlsl", "main", "vs_4_0_level_9_1", ShaderFlags.None))
{
    vertexShader = new D3D11.VertexShader(this.device,vertexShaderByteCode);
    inputSignature = new ShaderSignature(vertexShaderByteCode);
}

//
using (var pixelShaderByteCode = ShaderBytecode.CompileFromFile("pixelShader.hlsl", "main", "ps_4_0_level_9_1", ShaderFlags.None))
{
    pixelShader = new D3D11.PixelShader(this.device , pixelShaderByteCode);
}

triangle initialisation with pixel shader and vertex shader

titof49
  • 1
  • 2
  • Lumia 640 only supports DirectX 11 according to this link (https://www.microsoft.com/en-gb/mobile/phone/lumia640/specifications/). So it just doesn't support DirectX 9. Are you sure your problem is with the shader bytecode (its normally backward compatible and very few features are deprecated in HLSL) and not with the SharpDX libraries you are referencing ? – PhillipH Mar 06 '17 at 10:17

1 Answers1

0

ok i agreee with you, it's just about de shader

vs_4_0_level_9_1 ps_4_0_level_9_1 and

using (D3D11.Device defaultDevice = new D3D11.Device(D3D.DriverType.Hardware, D3D11.DeviceCreationFlags.None))

enter image description here

titof49
  • 1
  • 2