sharpdx

SharpDX WARP - minimal code to get a drawable surface

别来无恙 提交于 2020-01-07 04:19:28
问题 I asked another question about generating high quality graphics in a service on Windows Server and SharpDX looks like a reasonable possibility. However I am finding it difficult to find current how-to style documentation. I am specifically interested in the WARP device context. My use-case is for generation of png format images, and steps of interest are initialisation, loading existing images, drawing graphics and text on them, a resizing / scaling, and saving to png format. I mention this

Lights not working properly in Helix Sharp DX

情到浓时终转凉″ 提交于 2020-01-05 11:36:08
问题 I am trying to build an obj file viewer using Helix Toolkit (https://github.com/helix-toolkit/helix-toolkit) with SharpDX. So far I am able to load an object file and render it's contents to Helix Viewport3DX. Model looks good with some obj files but for others there are some lightning problem and back surfaces are always black. I am not sure what am I doing wrong. Is this light problem due to the fact that SharpDX does not support back materials?? Please help. Problem using Helix Sharp DX:

Generate tone, or sound, in Windows Phone 8.1 app

爷,独闯天下 提交于 2019-12-25 04:18:06
问题 I am attempting to generate a tone, for a set frequency and duration, on Windows Phone 8.1. Following up on the topic presented here: Playing a sound from a generated buffer in a Windows 8 app, here's my attempted solution for Windows Phone 8.1, running in a simulator in Visual Studio 2015, in VB.NET attempting to implement SharpDX.XAudio2. No sound comes out, but I think it's right. Any ideas? ' Initialization phase, keep this buffer during the life of your application ' Allocate 10s at 44

Rendered texture is transparent in DirectX 11

本小妞迷上赌 提交于 2019-12-25 01:27:07
问题 I am rendering H264 video frames from an IP camera which are decoded into BGRA32 pixel format via DirectX 11 and SharpDx in WPF via D3DImage control. After lot of research and looking at various samples and examples I have managed to get it finally got it to render H264 frames with DirectX 11 My current setup involves setting setting up vertex shader and pixel shader as below: var device = this.Device; var context = device.ImmediateContext; // Compile Vertex and Pixel shaders

SharpDx Save Bitmap to File

*爱你&永不变心* 提交于 2019-12-24 19:31:44
问题 I have a Sharpdx Direct2D1 Bitmap from the render target. I want to save it to a file as an image though. This is for test purposes. I am not sure if i need a WIC bitmap for that or how to convert these bitmaps. Or how to receive the WIC bitmap in the first place. Also i can't find an easy explanation how to save this bitmap to a file in general. Any help appriciated. Edit: I'm using this approach now: http://www.rolandk.de/wp/2013/06/inhalt-der-rendertarget-textur-in-ein-bitmap-kopieren/ It

Saving a Texture2D using SharpDX when targeting Win8.1 + Metro?

Deadly 提交于 2019-12-24 16:19:54
问题 I'm trying to save a user-generated Texture2D to disk, but it looks like the standard ways of accomplishing this aren't available when targeting DirectX11.1 / Win8.1 / Metro. ToStream/FromStream are absent, and the DX11 methods for writing a texture to disk are absent as well. Any ideas or suggestions? 回答1: Here's the general solution I ended up with. Getting a DataStream through mapping a texture resource is what got me on the right track. General flow is create a texture with CpuAccessFlags

Read Second audio track stream from mp4 file using SharpDx or IMSourceReader

烂漫一生 提交于 2019-12-24 14:18:43
问题 I have a requirement in my application where I have to read all the available track stream from mp4 file. Mp4 file is encoded with number of tracks in AAC format. I have to decode to get all available tracks from the file. Currently I am using SharpDX and IMSourceReader (Media Foundation dlls) to read the Streams. But by default SourceReader returns only the first audio stream from the file. Is it I am doing correct ? Or I have to use any other third party libraries to achieve this ? 回答1:

SharpDX 3.0.2 D3D11 - How to load texture from file and make it to work in shader?

孤人 提交于 2019-12-24 12:44:21
问题 I have 0 experience with D3D. I am currently reading Frank Luna's book about D3D11 and trying to make examples working in C# using SharpDX though w/o effect framework. I stuck with texturing now. I don't understand how to load texture from file and how to send it to shader. Official wiki is dead. Or at least it doesn't load for me. I searched here but found only some way to do it with SharpDX.WIC which is with D2D so it looks a bit weird for me to use some D2D components in D3D app. 回答1: Look

Performance Issues with SharpDX and D3DImage

◇◆丶佛笑我妖孽 提交于 2019-12-24 08:58:05
问题 I have a control that uses D3DImage to host a SharpDX DirectX9 surface and allows use to pan, zoom, and interact with world objects and the result is really awesome. Performance is actually an amazing consistent 60fps EXCEPT when the window is minimized and brought back up or the user locks and then unlocks the screen. When the window regains focus the fps drop to about 25-30fps. I can "fix" the issue by unloading and loading the control back into its container and then BOOM, 60fps. I call

Displaying large image with SharpDX

ぐ巨炮叔叔 提交于 2019-12-24 06:42:37
问题 I'm trying to use SharpDX to draw a large image (21000x7000) from file. The code looks like this: if (newBitmap==null) { ImagingFactory imagingFactory = new ImagingFactory(); NativeFileStream fileStream = new NativeFileStream(@"D:\path\myfile.png", NativeFileMode.Open, NativeFileAccess.Read); BitmapDecoder bitmapDecoder = new BitmapDecoder(imagingFactory, fileStream, DecodeOptions.CacheOnDemand); BitmapFrameDecode frame = bitmapDecoder.GetFrame(0); FormatConverter converter = new