OS X/Xcode Questions

TheGeek

Golden Member
Jun 6, 2004
1,090
1
0
I just started programming for OS X using Cocoa. I am coming from Win32, so it is pretty different. I ported an OpenGL project over to Cocoa by subclassing the OpenGL view and then extern-ing my C++ OpenGL code so that my Objective-C class can use my functions. That works fine. I have a few questions related to OpenGL/Xcode/Cocoa. BTW, I am going to school for game development, so thats why I'm only interested in OpenGL and not just normal applications.

1. How can I get keyboard and mouse input in my program? I dont want buttons or anything, I want to be able to get it from within an OpenGL view. In Win32 I would use either DirectInput or just GetAsyncKeyState().
2. Is there a way to get input in C++ with the way I am doing it?
3. Is there an Objective-C interface to OpenGL?
4. Does Xcode always require absolute paths to files? I am use to using VS2005 which can use relative paths for all files, whereas in Xcode/OpenGL I can only seem to get a file loaded if I use its absolute path, which is rather frustrating.
5. Is there a global way to set an include directory, like you can in VS2005? I have a bunch of utility and helpful files that I have made and it's a pain in the ass to have to set each project to look in the same directory for headers.

I think that is about it for now. I will probably have more as time goes on. Thanks a lot in advance for any replies.
 

programmer

Senior member
Mar 12, 2003
412
0
0
Not sure if I can answer all your questions, as most of the code I've written for the Mac the last few months has been BSD or Carbon, very little Cocoa. But I was fortunate to recently be in a Cocoa Programming course taught by Aaron Hillegass himself. My advice -- buy his book ("Cocoa Programming for Mac OS X")!

http://www.bignerdranch.com/products.shtml

Also buy the other book (Advanced Mac OS X Programming). It is less Cocoa and more Mac OS X platform and also an excellent source of info.

The Apple developer site has FANTASTIC info, and tons of it... For example, see the Cocoa OpenGL sample at http://developer.apple.com/sam...ocoa_OpenGL/index.html... and this document should be comprehensive on OpenGL:
https://developer.apple.com/do...apter_1_section_1.html


More advice: for Cocoa, stick with Objective-C as much as possible instead of C++.

I believe the next version of the Xcode libs may support a Cocoa interface to OpenGL too.

Enjoy!
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |