sharpdx

How does one use a memory stream instead of files when rendering Direct2D images via SharpDX?

自闭症网瘾萝莉.ら 提交于 2019-12-07 03:09:47
问题 The setup Consider the given scratch program that uses SharpDX, a managed wrapper for Direct* libraries, to render a bitmap and save it as a PNG: namespace ConsoleApplication5 { using System; using System.Diagnostics; using System.IO; using SharpDX; using SharpDX.Direct2D1; using SharpDX.DirectWrite; using SharpDX.DXGI; using SharpDX.IO; using SharpDX.WIC; using AlphaMode = SharpDX.Direct2D1.AlphaMode; using Bitmap = SharpDX.WIC.Bitmap; using D2DPixelFormat = SharpDX.Direct2D1.PixelFormat;

SharpDX vs SlimDX for game development? [closed]

怎甘沉沦 提交于 2019-12-05 16:10:23
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Which one of these offers the best API for game development? Which library is easier to use, faster, has more documentation? 回答1: Both

SharpDX: Enabling BlendState

主宰稳场 提交于 2019-12-04 17:21:05
I'm trying to get the "SharpDX.Direct3D11.DeviceContext.OutputMerger.Blendstate" to work. Without this, i have nice scene (Polygones with textures on it, for a Spaceshooter). I've done OpenGL Graphics in the past three years, so i thought it might be as simple as in OpenGL - just enable Blending and set the right Dst/Src Modes. But if i set a new BlendStateDescription, all Output is Black, even if "RenderTarget[x].IsBlendEnabled" is set to "false". I searched for a tutorial or something, and find one - but it uses effects. So my question is simple - do i have to use technique's and effects in

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

血红的双手。 提交于 2019-12-04 14:34:04
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-axis (into the screen). My bugfixing model is a simple quad with 1.f width and height, z = 0 and being

Quaternion from Tait-Bryan angles

核能气质少年 提交于 2019-12-04 13:29:46
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"), positive values make the camera look leftwards. If I rotate around Z ("rolling"), the camera rolls

Launching SharpDX/DirectX app with DeviceCreationFlags.Debug

你说的曾经没有我的故事 提交于 2019-12-04 05:23:30
问题 I am trying to launch my directX/SharpDX app with DeviceCreationFlags.Debug but i am getting the following crash upon startup: SharpDX.SharpDXException: HRESULT: [0x80004005], Module: [General], ApiCode: [E_FAIL/Unspecified error], Message: Unspecified error at SharpDX.Result.CheckError() at SharpDX.Direct3D11.Device.CreateDevice(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, FeatureLevel[] featureLevels) at SharpDX.Direct3D11.Device..ctor(Adapter adapter,

SharpDX vs SlimDX for game development? [closed]

耗尽温柔 提交于 2019-12-04 00:09:43
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Which one of these offers the best API for game development? Which library is easier to use, faster, has more documentation? Both projects support nearly the entire DirectX libraries (though SlimDX does support a bit more in the DirectX

D3DImage and SharpDX flickering on slow hardware

别来无恙 提交于 2019-12-03 16:53:31
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 || IsInDesignMode) return; var test = Renderer as D3D11; if (queryForCompletion == null) {

SharpDX 2.5 in DirectX11 in WPF

白昼怎懂夜的黑 提交于 2019-12-03 11:05:40
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? SharpDX supports WPF via SharpDXElement . Take a look in the Samples repository at the Toolkit.sln - all projects that have WPF in their name use SharpDXElement as rendering surface: MiniCube.WPF -

SharpDX render in WPF

谁说我不能喝 提交于 2019-12-03 00:07:11
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 the code somehow that I only have to call BeginDraw, create lines and EndDraw, not always doing all of