CoreGraphics support


#1

I’ve just written a LowLevelGraphicsContext that uses CoreGraphics to do its rendering.

Actually turned out to a lot easier than I expected, just a few hours work - it’s checked it in, and is set to be the default renderer for component painting. (If you’re rendering into an Image, the old software renderer is still used).

In the juce demo everything seems to look correct. Strangely, some things render much faster than the old renderer (e.g. image rescaling), and others not so well (e.g. complex Drawables). but I’d be interested to hear if it works in your projects… If it fails disastrously or has lousy performance, you can easily disable it with the USE_COREGRAPHICS_CONTEXT flag in juce_mac_NSComponentPeer.mm

It’s only a first pass, and next I’ll be refactoring the design of the LowLevelGraphicsContext class to make a better fit with native contexts, which should speed things up…


#2

So what do we do and or replace get current font with?
[EDIT]
Scratch that! Done…


#3

Demo looks alright. I will check out the code and give it a try.


#4

Forgot to mention that my roll-over stuff started to work in Logic 8 and 9. I will confirm this and build my plugin against the pre coreGraphics version.


#5

Nah, that’s wishful thinking… (or if it’s true, logic must be doing something unbelievably strange!)


#6

Yep, wishful thinking…
Rollovers and other mouse event stuff works in Logic but only until the plugin window was clicked for the first time. After that no rollovers, no focus callbacks, no proper key input and so on. Logic is really a pita!


#7

Ok… I know this has nothing to do with this topic anymore, but in Logic “9” everything started working in regard to UI stuff. Text editors get focus, mouse overs react as expected etc…

[EDIT]
It has nothing to do with the new “CoreGraphics rendering” business, just Logic being fixed. “Logic being fixed” sound a bit scary… Something else will in fact be broken!


#8

[quote=“friscokid”]Yep, wishful thinking…
Rollovers and other mouse event stuff works in Logic but only until the plugin window was clicked for the first time. After that no rollovers, no focus callbacks, no proper key input and so on. Logic is really a pita![/quote]

Is this a known bug for Juce in Logic 8? I just uncovered this in my plugin this weekend. Rollovers only work until the first click, then none of my fancy tooltips work. Are there any possible Juce fixes, or is it just a Logic 8 issue?

Thanks,

Sean Costello


#9

This issue should have been fixed in the meantime.
Are you using the latest tip?


#10

I just updated to the latest tip. I thought that I had been updating correctly (using git pull), but the 1400+ errors I got this morning after I linked my plugin to a fresh copy of the Juce code makes me think that I wasn’t updating correctly.

Anyway, my plugin now builds, and the tooltips / mouse-over events work correctly in Logic 8. Thanks for the advice!

Sean Costello