OpenGL and me ,am I doing it right?

Discussion in 'Mac Programming' started by iamamthelawl, Jul 11, 2008.

  1. iamamthelawl macrumors newbie

    Joined:
    Dec 16, 2007
    #1
    I use to work with DirectX and c++ for some projects before and now using the mac I am using opengl. The problem I am facing is an obj-c (Pure obj c) tutorial on it, most books cover c and c++ style programming that I know and I am fine with but if I want to take advantage of cocoa I need obj-c. Am I missing out by using what opengl.org considers pure cross platform or can you recommend a obj-c based tutorial (Other than apples)?

    Thanks

    me
     
  2. lazydog macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #2
    Hi

    You can stick to C/C++ for all the OpenGl parts of your application no problems. Just give those files a .cpp extension. If you want to concentrate on learning OpenGl then you might want to use GLUT as then you don't need to know or use any Cocoa or Objective C.

    b e n
     
  3. iamamthelawl thread starter macrumors newbie

    Joined:
    Dec 16, 2007
    #3
    I remember reading in a book called the opengl super bible that apples glut is updated or more well kept then the windows one. How so? I thought it could not be updated? Did it fix bugs in it?
     
  4. lazydog macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #4
    I'm not sure about the status of GLUT as an on going project. At any rate, the current version works well enough to create simple to complex apps so long as they are self contained (as far as controls are concerned).

    b e n
     
  5. iamamthelawl thread starter macrumors newbie

    Joined:
    Dec 16, 2007
    #5
    But will glut sufice or should I continue looking at other ways of doing it?
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    You really need very little to get an OpenGL window going on Mac OS X but you may be interested in this book.
     
  7. lazydog macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #7
    Depends on the apps you have in mind. If all you need is a framework to provide an OpenGL context, keyboard and mouse events, and a timer, then probably yes. Anything more then no. GLUT is so simple to use though that it is a valuable framework for experimenting and learning OpenGL in, so you won't be wasting your time learning and playing around with GLUT, even if you end up going down the Cocoa route.

    b e n
     

Share This Page