|
|
#1 | |
|
Using C++, Objective-C and OpenGL
Howdy,
Well, in my quest for knowledge, I've seen several threads on various forums where there's a discussion of wrapping C++ to Cocoa to be able to create C++ GUI applications on Mac OS. Most of the answers pointed to using Cocoa for the GUI parts (possibly Objective-C++ with .mm files) and C++ for the rest, but not many examples of how to actually do something like that. I did, however, find this old thread here that gave me inspiration: http://forums.macrumors.com/showthre...th+objective+c ... and got the ball rolling. According to the Application Kit Framework Reference: https://developer.apple.com/library/...c/uid/20001093 … AppKit.framework is really all you need to create a GUI application: Quote:
Here's my project so far: http://www.cactus3d.com/CPPAppKitTest.zip Since most of my experience is with C/C++ (started learning C on a 68K Centris 650), Objective-C is a bit foreign to me, so I tried to keep the Objective-C code to a minimum. I reckon what I'm asking is if someone could look over the code in the above project and tell me if the Objective-C code is done correctly (specifically the memory management) and possibly offer any suggestions for improvements. It seems to work fine and running it with the debugger console doesn't report any issues. Adios, Cactus Dan |
||
|
|
0
|
|
|
#2 |
|
Howdy,
Hmmmm, a week later with 250+ views and no replies, is it safe to assume the Objective-C code in the project is fine? ![]() Adios, Cactus Dan |
|
|
|
0
|
|
|
#3 |
|
.. or maybe you're asking at the wrong place. Try stackoverflow or some other forums where the visitors are mainly developers.
|
|
|
|
0
|
|
|
#4 | |
|
Quote:
Also, since the OP specifically asked about memory management: There are memory tools (zombies and leaks) in Instruments that specifically address memory mgmt. |
||
|
|
0
|
|
|
#5 |
|
Howdy,
Ah, thanks for the tip. I wasn't aware of Instruments. It works great and no memory leaks in the project. ![]() Adios, Cactus Dan |
|
|
|
0
|
|
|
#6 |
|
I find this absolutely fascinating! Have you done anything new or having any new updates to share? Shoot, something like this should be placed into GIT and a team should be assembled to work on it. I absolutely love it!
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Initializing C-style array for use in Objective-C class | Thethuthinang | Mac Programming | 3 | Jan 29, 2012 12:56 PM |
| Learning Objective-C from C | lynkynpark86 | iPhone/iPad Programming | 19 | Jan 2, 2012 04:24 PM |
| *GOOD* Objective-C 2D OpenGL Tutorials | MorphingDragon | Mac Programming | 4 | Jun 22, 2010 10:30 PM |
| Using an Objective-C array with a slider to return custom values generates warning | StevenHu | iPhone/iPad Programming | 9 | Oct 8, 2009 12:17 PM |
| OPENGL using textured layers and sprites, best choice? | mymac1 | iPhone/iPad Programming | 4 | Aug 25, 2009 12:07 AM |
All times are GMT -5. The time now is 05:32 PM.









Linear Mode

