-
Notifications
You must be signed in to change notification settings - Fork 27
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
Graphics #4
Comments
Did you have a particular implementation plan here already? EDIT: Nevermind, they map to this:
IE, for https://github.com/justinfrankel/WDL/blob/master/WDL/swell/swell-gdi-generic.cpp#L279-L290
For the JUCE example of using REAPER's embedded UI stuff, I had to figure out to draw the LICE bitmaps that REAPER hands to the render method into a JUCE component. To do that is: void doPaint (reaper::REAPER_FXEMBED_IBitmap* bitmap)
{
if (bitmap == nullptr || drawInfo == nullptr || bitmap->getWidth() <= 0 || bitmap->getHeight() <= 0)
return 0;
Image img (juce::Image::PixelFormat::ARGB, bitmap->getWidth(), bitmap->getHeight(), true);
Graphics g (img);
Image::BitmapData imgData { img, Image::BitmapData::readOnly };
const auto pixelsWidth = imgData.pixelStride * imgData.width;
auto* px = bitmap->getBits();
const auto rowSpan = bitmap->getRowSpan();
const auto numRows = bitmap->getHeight();
for (int y = 0; y < numRows; ++y)
std::memcpy (px + (y * rowSpan), imgData.getLinePointer (y), (size_t) pixelsWidth);
} So maybe that |
Kind of yes, but it's not set in stone, there would be 2 ways to go at this problem.
only the method 2. would have the ability of accelerated rendering. |
Probably better to do the second one, I've noticed you've also kept the core of it decoupled from JUCE which is nice given the flexibility of re-using it in other environments/context |
It's a goal, given that this lib is not only for plugins but also for hosts, starting with Carla. A thing about these graphics is they are modeled after Windows GDI software rendering. |
There is success so far with getting Lice into the master branch. The library user should only provide the framebuffer of the window, and other information like mouse and key data, and Retina status. |
What exactly is a framebuffer? Is it something you can get from a window pointer/handle, like |
The framebuffer is an image that keeps the pixel data in RAM memory. This is checked working, which means the hardest work is done, next it will be about adding the graphics primitives. (which should be a copy-and-paste from eel_lice) |
We have liftoff! 🚀 Video clip below is incredible! X8dx0QVWC0.mp401T7F0Lenh.mp4 |
Yes, I've added a few more right now but there still remains to do some major ones.
|
@JoepVanlier ("Saike") sets the bar for JSFX development IMO, his plugins are probably the golden standard as far as unit testing: Big repo of them here: The ones under the
There's also Geraint Luff's JSFX, which are fantastic: |
ReEQ is another one. |
Graphics are mostly working now, needs just these few features such as cursor and popup. |
The status of gfx is supposed to be now implemented 100%. |
https://www.reaper.fm/sdk/js/gfx.php
Note (1): this appears to be the default font
https://int10h.org/oldschool-pc-fonts/fontlist/font?tandy1k-ii_200l
Note (2):
gfx_showmenu
is synchronousthis blocks
@gfx
from running, but not the entire hostThe text was updated successfully, but these errors were encountered: