Page 1 of 1

XCode and graphics

Posted: Thu Sep 16, 2010 10:19 pm
by emosewA
Ok guys, just got my new Mac Mini saturday and i thought i would break it in with some C++. Unfortunatly, I have no idea how to do anything graphical in XCode. What should I do?

Re: XCode and graphics

Posted: Thu Sep 16, 2010 10:38 pm
by avansc
What do you mean "graphical". Do you mean GUI, or OpenGL?
http://developer.apple.com/library/mac/ ... ample+Code // sample code
http://developer.apple.com/library/mac/navigation/ // general apple developer page for mac development.

Re: XCode and graphics

Posted: Fri Sep 17, 2010 1:45 pm
by emosewA
Oh sorry, I posted that while I was doing something else. I meant with OpenGL

Re: XCode and graphics

Posted: Fri Sep 17, 2010 2:27 pm
by avansc
OpenGL is by FAR the easiest to get working on OSX, since its part of the core OS. you have to include OpenGL.framwork, and glut for context creation, you can also use X for that, but i dont recommend it, SDL will work as well, and ofcourse you can go and use cocoa to get the context, but that involves objective C.

There are lots of examples on OpenGL on the apple developer site, just enter opengl in the sample code section.

Re: XCode and graphics

Posted: Fri Sep 17, 2010 9:12 pm
by emosewA
Well see, I was following a tutorial vid but the framework just isnt there. I cant find it in the library. Sorry if this is nooby, im not that great with Macs yet

Re: XCode and graphics

Posted: Fri Sep 17, 2010 9:25 pm
by avansc
emosewA wrote:Well see, I was following a tutorial vid but the framework just isnt there. I cant find it in the library. Sorry if this is nooby, im not that great with Macs yet
what framework?

Re: XCode and graphics

Posted: Fri Sep 17, 2010 9:41 pm
by emosewA
OpenGL. in the library, i only have the Adobe AIR framework

Re: XCode and graphics

Posted: Sat Sep 18, 2010 12:24 am
by Trask

Re: XCode and graphics

Posted: Sat Sep 18, 2010 9:01 am
by avansc
You need to understand where frameworks are stored.
The apple developer site has a guide on frameworks.

These should be the default frameworks that come with a stock install of osx(SL in my case)
and the directory where all this is located is /System/Library/Frameworks

Code: Select all

AGL.framework				InstallerPlugins.framework
Accelerate.framework			InstantMessage.framework
AddressBook.framework			JavaEmbedding.framework
AppKit.framework			JavaFrameEmbedding.framework
AppKitScripting.framework		JavaScriptCore.framework
AppleScriptKit.framework		JavaVM.framework
AppleScriptObjC.framework		Kerberos.framework
AppleShareClientCore.framework		Kernel.framework
AppleTalk.framework			LDAP.framework
ApplicationServices.framework		LatentSemanticMapping.framework
AudioToolbox.framework			Message.framework
AudioUnit.framework			NetFS.framework
Automator.framework			OSAKit.framework
CalendarStore.framework			OpenAL.framework
Carbon.framework			OpenCL.framework
Cocoa.framework				OpenDirectory.framework
Collaboration.framework			OpenGL.framework
CoreAudio.framework			PCSC.framework
CoreAudioKit.framework			PreferencePanes.framework
CoreData.framework			PubSub.framework
CoreFoundation.framework		Python.framework
CoreLocation.framework			QTKit.framework
CoreMIDI.framework			Quartz.framework
CoreMIDIServer.framework		QuartzCore.framework
CoreServices.framework			QuickLook.framework
CoreVideo.framework			QuickTime.framework
CoreWLAN.framework			Ruby.framework
DVComponentGlue.framework		RubyCocoa.framework
DVDPlayback.framework			ScreenSaver.framework
DirectoryService.framework		Scripting.framework
DiscRecording.framework			ScriptingBridge.framework
DiscRecordingUI.framework		Security.framework
DiskArbitration.framework		SecurityFoundation.framework
DrawSprocket.framework			SecurityInterface.framework
ExceptionHandling.framework		ServerNotification.framework
FWAUserLib.framework			ServiceManagement.framework
ForceFeedback.framework			SyncServices.framework
Foundation.framework			System.framework
GLUT.framework				SystemConfiguration.framework
ICADevices.framework			TWAIN.framework
IMCore.framework			Tcl.framework
IOBluetooth.framework			Tk.framework
IOBluetoothUI.framework			VideoDecodeAcceleration.framework
IOKit.framework				WebKit.framework
IOSurface.framework			XgridFoundation.framework
ImageCaptureCore.framework		vecLib.framework
InputMethodKit.framework
If you right click your project, or a group in your project, you can add a framework, a list will automatically be populated with this info, alternativly you can choose other, and explicitly choose any framework/lib located anywhere.

Re: XCode and graphics

Posted: Sat Sep 18, 2010 9:12 am
by emosewA
yes, that works great, thanks!