Skip to content
Prev 8649 / 15075 Next

[patch] rgl based on Cocoa API (instead of Carbon)

Hello,

Attaching here patch + osxgui.mm source for Cocoa based Mac backend for rgl package that makes rgl work with native UI on both 32-bit and 64-bit.

Installation notes:
? patch should be applied on SVN "rgl" sources svn://svn.r-forge.r-project.org/svnroot/rgl/pkg/rgl
? "src/osxgui.cpp" shall be removed and replaced by attached "src/osxgui.mm" (patch replaces Carbon backend)
? "configure" shall be regenerated with `autoconf` - patch only modifies "configure.ac"
? installing using `R CMD INSTALL .` in patched "rgl" directory

Cocoa backend notes:
? it does require FreeType for default system font (AFAIK present in OSX since Tiger), reason - Carbon version used deprecated aglUseFont which is 32-bit only
? it does introduce "gl.aa" setting, so having `option(gl.aa = 16)` makes pretty antialiased rendering, I'd suggest maybe that other OS backends shall use this setting too

Waiting for your feedback,