Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Member Since 03 Dec 2009
Offline Last Active Jan 03 2012 03:00 AM

Topics I've Started

DirectWrite TextFormat SetTrimming?

02 October 2011 - 12:20 PM


I am rewriting an application and replacing Win7ApiCodePack/DirectX with SlimDX but I cannot find a DirectWrite TextFormat.SetTrimming(..) method, or is this
accomplished some other way with SlimDX.

Best Regards
Lars Krog-Jensen

[SlimDX] DirectX9 memory usage on Windows 7

29 October 2010 - 03:39 AM

When using DirectX9 devices on Windows Vista and Windows 7 it seems to allocate alot of system ram. The exact same app on XP is consuming video memory, but hardly any system ram at all - as I would expect.

Same app running with a Direct2D render layer on Windows 7 is consuming very little system ram.

Should say that it is not on the managed heap, and thus the unmanaged heap.

Anyone knows if this behavior is expected due to some changes i Windows 7?


[SlimDX] How to scroll a Direct2D scene?

10 October 2010 - 07:17 AM

I have built a datagrid with SlimDX and Direct2D/DirectWrite that I am trying to make scrolling smoother and faster.

When scrolling I would like to avoid repainting the entire scene and only push a certain area of the existing scene upwards or downwards, and then only paint the new rows. I don't want to move the entire scene as the header should remain fix.

The part that I do not know how to handle is how to make a rectangle and move it.

Anyone has a suggestion that is performant.

[SlimDX] DirectWrite/Direct2D text rendering performance

08 September 2010 - 03:44 AM


I have a question regarding DirectWrite/Direct2D text rendering performance that I cannot get to perform as good as I want/expected.

We have built a market data 'realtime' datagrid using different rendering strategies depending on OS version, available HW and user preferences. I have built a DirectX9, Direct2D/DirectWrite and a GdiPlus strategy.

All those works fine and the DirectX9 version is the clear performance leader, which is using the Direct3D Font that to my knowledge is using GDI behind the scenes to rasterize the text before being sent to the GPU. This performs OK.

When first heard of DirectWrite is was supposed to be all in HW, but this seems not to be true, when profiling the majority of the CPU time is spent in the WindowRenderTarget.DrawText. I have experimented with the different settings to get it perform better, but with no success. In fact; DirectWrite performs worse than the GdiPlus rendering strategy.
(Perhaps I should say that the GdiPlus strategy is drawing to a BufferedGraphics that is in turn is using GDI to BitBlt the back buffer, so it is kind of HW accelerated)

Does anyone have some information regarding how to make DirectWrite perform optimal and if it using the CPU to rasterize the fonts.

The application is displaying a lot of different text, so reusing a TextLayout is not an option.

The only downside of the DirectX9 strategy is that it seems to allocation huge amount of RAM, a trading desktop might have hundreds of different windows displaying different data - so it is a problem as well.

I would be really grateful if someone would share their knowledge on this.

Regards Lars

[SlimDX] How to convert a D2D Bitmap to Png Image

13 January 2010 - 03:22 AM

Hi I am using SlimDX D2D and are trying to convert a Bitmap (D2D)to PNG image that I can store to file. Does anyone know how to do this? Best Regards Lars Krog-Jensen