[R-SIG-Mac] [patch] rgl based on Cocoa API (instead of Carbon)

Adam Strzelecki ono at java.pl
Sun Dec 18 21:11:37 CET 2011


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,
-- 
Adam Strzelecki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osxgui.mm
Type: application/octet-stream
Size: 13133 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20111218/31e6c9d7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgl-cocoa.patch
Type: application/octet-stream
Size: 3667 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20111218/31e6c9d7/attachment-0001.obj>


More information about the R-SIG-Mac mailing list