FAQ Database Discussion Community

HUD basics using SharpDX: How to Draw over the screen surface?

Scenario I'm planning to learn the basics about how to develop a custom HUD for a 3rd party PC-game (free, legal), my intention is to develop an application that will draw/show additional info on the screen (by reading mem addresses). So I've researched for profesional projects and I've found TurboHUD...

'using' scope in C# and sharpdx

The question is more C# related, but I started learining sharpdx recently and I came up on two ways to initialize resources. First stores the resource (Texture2D in this example) as a global variable. Then in code assigns the value to it and passes it to sharpdx's method (and down...

SharpDX DirectWrite rotate text

I wondered how to rotate a text rendered with Direct2D with SharpDX. Can not find any possiblity in RenderTarget2D.DrawText() or RenderTarget2D.DrawTextLayout()...

Apply color for each and every point in PointCloud Using HelixToolkit

I have created a point cloud in HelixToolKit. I need to apply color for each and every point . When I am using PointVisual3D there is no options for setting color for each and every point . It set color for the whole point cloud. When I am using PointGeometryModel3D...

Does a float3 in a constant buffer secretly add padding?

I have a cbuffer in my shader.fx file, like so: cbuffer lights : register (b1) { float4 Light1Color; float3 Light1Direction; float4 Light2Color; float3 Light2Direction; float4 Light3Color; float3 Light3Direction; } I had some issues filling this cbuffer from my code, it ended up being an array of the following struct: struct...

Update a D3D9 texture from CUDA

I’m working on a prototype that integrates WPF, Direct3D9 (using Microsoft’s D3DImage WPF class), and CUDA (I need to be able to generate a texture for the D3DImage on the GPU). The problem is, CUDA doesn’t update my texture. No error codes are returned, the texture just stays unchanged. Even...

Direct2D plot approach / performance

How is the approach to plot complex drawings with Direct2D (Sharpdx)? Actually I am using a WindowsRenderTarget, connecting it with a Direct2D1.Factory and drawing to a RenderControl. Factory2D = new SharpDX.Direct2D1.Factory(FactoryType.MultiThreaded); FactoryWrite = new SharpDX.DirectWrite.Factory(); var properties = new HwndRenderTargetProperties(); properties.Hwnd = this.Handle; properties.PixelSize = new Size2(this.ClientSize.Width, this.ClientSize.Height); properties.PresentOptions =...

Sharpdx - Depthstencil not working when using MRT (Multiple Render Targets)

been trying to change a renderer I wrote from SlimDX to SharpDX and ran into a problem. I want to render to multiple render targets (in this case color and object ID for picking) This is the initialization of the rendertargets (all with same dimension and multisample setting) //Swapchain, Device,...

How much improvement can I expect with SharpDX over heavily optimized GDI code in C#/WinForms?

I've been working on a C#/GDI graphical app for a couple years. I've spent a lot of time optimizing the drawing code. I am drawing to the screen by invalidating a PictureBox control about 10 times a second, and by leveraging subsequent OnPaint event that occurs when Windows triggers it....

Texture for UnorderedAccessView

I would need to create an UnorderedAccessView for use as output of a compute shader: var target = new Texture2D(device, new Texture2DDescription() { Width = bitmap.PixelWidth, Height = bitmap.PixelHeight, ArraySize = 1, MipLevels = 1, Format = Format.R8G8B8A8_UNorm, SampleDescription = new SampleDescription() { Count = 1, Quality = 0 },...

SharpDX Bitmaps

I've been looking around the internet for a while, and I can't seem to find the answer I've been looking for. So what I intend to do with bitmaps is I want to draw them onto the window, and be able properly resize them whenever. Any help would be appreciated!