Closed ayyb1988 closed 2 years ago
I never used JUCE but the code in class LomseComponent
looks right to me.
The only problem I see is that in class MainWindow
there is no code to invoke LomseComponent::paint()
, that is responsible for painting the score in the juce::Graphics
device. Probably you should place this invocation in the MainWindow
paint event handler, or just after the line
pComponent->setPresenter(std::unique_ptr<lomse::Presenter>(pPresenter));
but depends on your app. logic.
Project https://github.com/hugbug/conpianist uses Lomse with JUCE. Perhaps you can get inspiration in its code.
Thanks, I'll take a look at the conpianist, LomseComponent::paint() will be called back by the jUCE framework
solved this problem:
change
interactor->set_rendering_buffer (&buffer);
to
spInteractor->set_rendering_buffer(bitmap.data,getWidth(),getHeight());
Reference:https://gist.github.com/ffAudio/a51e5f660f362035566e09fb4e629446#comments