简体   繁体   中英

Mac OS X drawing program

I want to write a ray tracer for a Mac. I don't want to learn Objective-C, is it possible to mix C++ and Objective-C? Is there some simple example somewhere of a program that does that and draws on the screen?

You can definitely mix C++ and Objective-C is called Objective-C++.

Basically you use Objective-C for the UI and all your logic and controllers can be done using C++. You don't need too much objective-c to do this. If you have a little time for this approach I definitely recommend it is incredibly powerful. (many Apple frameworks do this way)

But if you don't want to learn Objective-c at all you can use OpenCV too. OpenCV is a bunch of of algorithms for image processing, computer vision, machine learning, AR, tracking, etc. It has some basic UI elements (windows, buttons, slide bars, etc) which you will find useful. You only need C++! and it will work in many OSs

SDL work on OS X and should work seamlessly with C++ code.

http://www.libsdl.org/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM