-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direct2d exploration #66
base: main
Are you sure you want to change the base?
Conversation
The adapters are already stored by JUCE. We'll probably want to cache the device context.
I'll take a look.
Fairly certain that for D2D effects the source & destination need to be different. Could just copy the source back to the destination when we're done and keep a temporary scratchpad image for the output.
I need to figure out how to convert image formats in the GPU instead of on the CPU.
OK
|
This may be due to mixing the JUCE headers with the system headers. You may have better success if you can include the Windows headers first before any JUCE headers. |
Thanks for the comments! No matter the order of the includes, I can't get references to DxgiAdapter and friends to compile. For now, I've simplified and just trying to do everything in 1 function. My suspicion is part of the problem comes from trying to "reach into" the juce_graphics module internals. When one includes a juce module, one is supposed to just include the top level header like "juce_graphics/juce_graphics.h" which then goes and includes everything it needs to be happy — it usually causes problems to root around and try and include random files from modules. It also feels a bit wrong to be including windows.h and so on... BUT (big BUT!) I'm out of my depth here in Windows-land, so I have no idea what half of this stuff is :D I guess only JUCE module cpp implementation files are including things like |
Got single channel working, with a temporary image as the destination which then copies back to the source. Benchmarks are very promising, showing improvements that is an order of magnitude faster on larger image sizes in Release and improved performance in Debug (this is important).
|
Hey @mattgonzalez
This is what I did:
Feel free to jump in and run the tests target. You can open this project in CLion (or whatever will build cmake projects) or run cmake from the command line to build and run the tests.
These are the problems/thoughts so far:
juce::DxgiAdapter::Ptr adapter;
line is unhappy for some reason, when compiling I get an error (cannot convert argument 1 from const int to juce::DxgiAdapter::Ptr
).Note there's some oddities about running CMake from the root of a JUCE module so you'll need to NOT use Ninja (if you do, you'll run into an infinite loop).
Warning If you do get the tests running, it might crap a dozen images onto your desktop. That's how I've been doing manual inspection. I uhh.... should modify to put them in a subfolder.