OpenGL / GLUT Xcode templates

Discussion in 'Mac Programming' started by Cromulent, Dec 13, 2007.

  1. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #1
    Does anyone know of any good "pure" OpenGL / GLUT templates for Xcode (preferably Xcode 3) at all?

    I have the SDL / OpenGL templates but was hoping that there was a simple (and very basic) template available.
     
  2. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #2
    You can convert the SDL/OpenGL template to a GLUT template pretty easily. Make a copy of the SDL/OpenGL template folder and open your copy's Xcode project. You'll want to remove the parts of the SDL template you don't need for a GLUT template. Remove the SDL, AppKit, Cocoa, and Foundation frameworks from the project. Remove SDLMain.m and SDLMain.h from the project as well as the files in the Atlantis folder, such as atlantis.c.

    The main.c file in the SDL template does a lot. You'll want to substitute your own main.c or main.cpp file, depending on whether you want to write your GLUT programs in C or C++. After you get main.c looking the way you want, you have a GLUT project template.
     
  3. Cromulent thread starter macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #3
    Excellent, thanks. Hopefully that will just work.

    Still getting used to using Xcode.
     
  4. Cromulent thread starter macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    Thought I may as well post what I've been using.

    Very simple but saves a bit of boring typing.

    Edit : Bah realised I uploaded the wrong template. It should be fixed now.
     

    Attached Files:

Share This Page