Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 4, 2012, 12:04 PM   #1
robvas
macrumors 65816
 
Join Date: Mar 2009
Location: USA
OpenGL + Xcode 4

I seem to remember in Xcode 3 there was a project template that used an OpenGL-based view. Is it hiding in Xcode 4, or is there a link to a tutorial on setting it up from scratch?
robvas is offline   0 Reply With Quote
Old Feb 4, 2012, 01:54 PM   #2
robvas
Thread Starter
macrumors 65816
 
Join Date: Mar 2009
Location: USA
I got it all figured out. I think before there was a template provided by SDL which I used a long time ago. I looked through an old OpenGL tutorial I wrote and the second edition of 'Cocoa Programming for OS X' (old, but it still has some relevance) and came up with this:



I included the project file if anyone wants to play with it. Visit the NeHe page for OpenGL tutorials - http://nehe.gamedev.net/tutorial/lessons_01__05/22004/
Attached Files
File Type: zip OGL.zip (32.7 KB, 135 views)

Last edited by robvas; Feb 4, 2012 at 06:26 PM.
robvas is offline   0 Reply With Quote
Old Feb 4, 2012, 02:19 PM   #3
Mark FX
macrumors member
 
Join Date: Nov 2011
No its not hiding robvas, there is no OpenGL Mac project template in Xcode 4.
But there is a OpenGL Game template in the iOS templates.

You could create one and put it in the
~/Library/Developer/Xcode/Templates/Project Templates/Application/OpenGL
Folder, then it would be displayed on creating a new Xcode project.

A good start for a template, would be a standard Cocoa or Empty application, and then add the OpenGL.framework and the GLUT.framework, from the
project navigator, under the linked frameworks heading, click the + button to
add these frameworks.

Then you could also add a new Objective C Class file to the project, and type
in OpenGLView as its class name, and type in NSOpenGLView as its subclass.

You can also drag a OpenGL View object from the Object Library in Interface
Builder, onto the main Window, and set its class to the previously added file
OpenGLView.

Thats how I would go about getting a basic OpenGL project template.

Hope this helps.

Regards Mark

PS. I posted this after you found a solution, well done for that.
Mark FX is offline   0 Reply With Quote
Old Feb 4, 2012, 02:34 PM   #4
lloyddean
macrumors 6502a
 
Join Date: May 2009
Location: Des Moines, WA
A bit dated but gives the basics with interactive API presentation.

<http://user.xmission.com/~nate/tutors.html>
lloyddean is offline   0 Reply With Quote
Old Feb 4, 2012, 08:15 PM   #5
chrono1081
macrumors 603
 
chrono1081's Avatar
 
Join Date: Jan 2008
Location: Isla Nublar
I am so happy NeHe has been doing iOS tutorials. I know there is only two but I hope the trend continues.

I love OpenGL and every time I get back in to it some other project rips me right back out.
__________________
Macbook Air 13inch Ultimate
Hexcore MacPro 3.33ghz - 24 gigs ram - ATI 5870 - Dual 27inch ACD's
chrono1081 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Code signing error Xcode 4.2 nashyo iPhone/iPad Programming 4 Feb 1, 2012 09:04 AM
AppleScript and Xcode 4? wrignj08 Mac Programming 9 Dec 18, 2011 12:12 PM
XCode problem: Verify before Submission to App Store "Code Sign Error: Provisioning.. rebello95 iPhone/iPad Programming 6 Dec 4, 2011 12:26 AM
Xcode 4.1 'Run' won't work.. DoodlyDoo Mac Applications and Mac App Store 0 Sep 26, 2011 09:49 AM
xcode 4/older vs netbeans vs eclipse vs yourRecommendation on the mac for C++ neuroshock Mac Applications and Mac App Store 0 Jul 4, 2011 05:09 PM


All times are GMT -5. The time now is 08:52 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC