Can a plugin use Direct2D with a host which does not use Direct2D?


#1

I realize this may not have a simple yes/no answer.
Perhaps the phrase “feasible and reliable” would be better than simply “can”.
If the answer is “conditionally yes”, any comments about prerequisites in the design and implementation of the plugin, any pitfalls or obscurities, would be greatly appreciated.
This link hints there may be issues:
https://msdn.microsoft.com/en-us/library/windows/desktop/ff729481(v=vs.85).aspx


#2

Not a D2D expert, but I don’t see any reason this wouldn’t be possible. The host gives your plugin a window to display itself in and in most cases you have fairly free reign from there to do whatever inside it.

The main pitfall will be you won’t get any help from JUCE - it has incomplete and disabled D2D rendering support, so the only thing I can imagine doing would be ignoring all of JUCE’s rendering faculties and custom drawing everything…

What are you trying to do?


#3

Thanks for the reply. I have very little experience with D2D apart some VST 2.4 work long ago. Even less with JUCE and that was mid-2015.

Re D2D and JUCE, I have had some minor success using 5.1.2
The key for me was the JUCE Demo, specifically the Shortcut Keys button upper left, which allow switching the Graphics 2D Render sub-demo; numeral 1 for S/W, 2 for D2D, 3 for OpenGL. The performance readouts indicate when its doing D2D.

Another key was realizing that the #defines for D2D don’t (seem to) force D2D as the default renderer at startup; that requires effecting a change to currentRenderingEngine in juce_win32_Windowing.cpp

t0M recently mentioned D2D was “incomplete” but didn’t say more, I may need a separate post.

I’ve currently just gotten control of the font antialiasing. Long term I need to be able to update lots of small display objects in near real-time.


#4

A good way to get @t0m’s (or anyone’s) attention is to tag them. Hopefully he will see someone other than me asking for the D2D render to pleeeeease be finished…


#5

Oh well, there’s me too, and I suspect a bunch of other developers would really like this to be finally added. Having the software renderer as the only realistic reliable choice for a plug-in in Windows is a little disappointing on the performance side.