• Advertisement
Sign in to follow this  

Getting started with OpenGL on OSX

This topic is 1956 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello there,
I'm new over here, but I'm not exactly new to programming; I've studied Java, C, a bit of C++, and, since I got a Mac recently, I was trying to build my own knowledge of Obj-C.
Recently I was trying to learn a little bit of OpenGL, but almost everything that I've found online is windows-related. Can you guys help me find something suitable for OSX as well??

Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
I just started playing with OpenGL, with Java + lwjgl. So, even though I'm developing on OSX as well, there's nothing platform specific here. So that's the extent of my OpenGL experience.

Using a search engine I found this: http://developer.apple.com/library/mac/#documentation/graphicsimaging/conceptual/opengl-macprogguide/opengl_intro/opengl_intro.html#//apple_ref/doc/uid/TP40001987-CH207-TP9
I skimmed through this a bit and it looks promising. Just look at the table of contents and see what looks useful to you. There seem to be plenty of code samples. I'm assuming you're using Xcode, so getting your environment set up will be the only major challenge. developer.apple.com should have the info you need to get this set up.

Keep in mind, OpenGL itself is not platform specific. So, once you have a library which implements the OpenGL API, the API calls are pretty much the same, no matter what is language or platform. For example, this objective-c code is almost identical to what I would do in Java (using lwjgl) to draw a triangle:
[CODE]
static void drawAnObject ()
{
glColor3f(1.0f, 0.85f, 0.35f);
glBegin(GL_TRIANGLES);
{
glVertex3f( 0.0, 0.6, 0.0);
glVertex3f( -0.2, -0.3, 0.0);
glVertex3f( 0.2, -0.3 ,0.0);
}
glEnd();
}
[/CODE]

Again, once have a proper lib set up for your language/platform, you then just need to learn the OpenGL API.

The wikipedia article about OpenGL has a lot of good info, including history, concepts, and features: http://en.wikipedia.org/wiki/OpenGL

Hope that helps.

Share this post


Link to post
Share on other sites
One way it to find SDL, Allegro or any other cross platform library and start coding.

On a quick search try [url="http://db-in.com/blog/2011/01/all-about-opengl-es-2-x-part-13/"]this [/url]tutorial series. Also Apple seem to have some coding samples with OpenGL on their developer site.
Hope that helps.

Share this post


Link to post
Share on other sites
Ony little differences to other Unix/Linux. Anyway, I won't bother about that company anymore...

Share this post


Link to post
Share on other sites
[quote name='thok' timestamp='1347377489' post='4978922']
I just started playing with OpenGL, with Java + lwjgl. So, even though I'm developing on OSX as well, there's nothing platform specific here. So that's the extent of my OpenGL experience.

Using a search engine I found this: [url="http://developer.apple.com/library/mac/#documentation/graphicsimaging/conceptual/opengl-macprogguide/opengl_intro/opengl_intro.html#//apple_ref/doc/uid/TP40001987-CH207-TP9"]http://developer.app...01987-CH207-TP9[/url]
I skimmed through this a bit and it looks promising. Just look at the table of contents and see what looks useful to you. There seem to be plenty of code samples. I'm assuming you're using Xcode, so getting your environment set up will be the only major challenge. developer.apple.com should have the info you need to get this set up.

Keep in mind, OpenGL itself is not platform specific. So, once you have a library which implements the OpenGL API, the API calls are pretty much the same, no matter what is language or platform. For example, this objective-c code is almost identical to what I would do in Java (using lwjgl) to draw a triangle:
[CODE]
static void drawAnObject ()
{
glColor3f(1.0f, 0.85f, 0.35f);
glBegin(GL_TRIANGLES);
{
glVertex3f( 0.0, 0.6, 0.0);
glVertex3f( -0.2, -0.3, 0.0);
glVertex3f( 0.2, -0.3 ,0.0);
}
glEnd();
}
[/CODE]

Again, once have a proper lib set up for your language/platform, you then just need to learn the OpenGL API.

The wikipedia article about OpenGL has a lot of good info, including history, concepts, and features: [url="http://en.wikipedia.org/wiki/OpenGL"]http://en.wikipedia.org/wiki/OpenGL[/url]

Hope that helps.
[/quote]Thanks a lot, sometimes too much information is not information at all.
I'll start with wikipedia, and I'll try and see what the apple developers have in store! ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement