4

I'd like to switch from GDI+ to Direct2D. The main reason for this step is to keep bitmaps in the graphic memory.

To achieve a visual compatibility between GDI+ and D2D, the Anti-Aliasing-Mode is switched off for lines and figures (not for text). But I'm not happy with the results. In D2D there are unwanted cumulations of pixels which look ugly:

D2D soft generated image

D2D gpu genarated image

GDI+ generated image

I use SlimDX for accessing the D2D API but I haven't found anything for manipulating the alias.

Is there any chance to get the same results like in GDI+?

Could Direct3D be the solution?

taf
  • 71
  • 4
  • I guess you mean GDI, not GDI+. But, no, there's no explicit GDI-compatibility mode. It's either antialiased or aliased. What's a reason to disable AA in a first place? – bunglehead Mar 23 '17 at 19:58
  • My customers an me think the that the aliasing effect look better in this particular case. – taf Mar 26 '17 at 16:04
  • 1
    I'm wondering if the output result of D2D rendering looks different on other GPUs. – taf Mar 31 '17 at 11:05
  • 1
    You can test if it's the case by forcing software rendering with D2D1_RENDER_TARGET_TYPE_SOFTWARE. – bunglehead Mar 31 '17 at 13:11
  • Bingo, there are differences between the software and the gpu rendering (see images in the updated post). Unfortunately it's not nicer but different. And what does that tell me? I can't relay on exact aliasing, even if I'd find a workaround. – taf Apr 02 '17 at 20:32
  • Right, that means rendering results will depend on GPU and particular driver version too. Depending on render target properties, it might be possible to keep using GDI for such figures, while using D2D for the rest, if that makes sense for your application. – bunglehead Apr 02 '17 at 22:17

0 Answers0