Hi everyone-
I’ve been looking into using Direct2D for our next JUCE application. I’ve been able to use a HWNDComponent and render Direct2D within that child window, so that’s one approach.
However, I’d prefer to use the standard JUCE graphics API, so I thought I’d take a deeper look at the state of Direct2DLowLevelGraphicsContext and try and get a handle on what’s missing.
The JUCE Direct2D renderer works well and performs well for the most part. The text rendering looks really nice. However, there are still some problems. Here are the issues I’ve run into:
-
excludeClipRectangle is not implemented
-
beginTransparencyLayer and endTransparencyLayer not implemented. This is easy to check by just enabling the JUCE splash screen.
-
Drop shadows may not render correctly, which may be related to the transparency layer stuff.
-
AttributedStrings don’t always draw correctly. This is easy to reproduce with the FontsDemo in the JUCE demo. Change the JUCE demo to Direct2D mode; the list of fonts on the left hand side of the window will be blank.
-
Judging by the comments in the code, there may also be performance issues with SavedState and a few other minor issues
I’m going to keep testing and see if I can patch some of this. Please let me know if there are any other outstanding issues.
All the best-
Matt


