Jump to content

  • Log In with Google      Sign In   
  • Create Account


Getting started with OpenGL on OSX


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Rimher   Members   -  Reputation: 132

Like
0Likes
Like

Posted 10 September 2012 - 12:03 PM

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

Sponsor:

#2 thok   Members   -  Reputation: 664

Like
1Likes
Like

Posted 11 September 2012 - 09:31 AM

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:
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();
}

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.

#3 ZeroBeat   Members   -  Reputation: 512

Like
0Likes
Like

Posted 11 September 2012 - 09:48 AM

One way it to find SDL, Allegro or any other cross platform library and start coding.

On a quick search try this tutorial series. Also Apple seem to have some coding samples with OpenGL on their developer site.
Hope that helps.

#4 derda4   Banned   -  Reputation: 147

Like
0Likes
Like

Posted 11 September 2012 - 10:07 AM

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

#5 Rimher   Members   -  Reputation: 132

Like
0Likes
Like

Posted 11 September 2012 - 10:59 AM

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.app...01987-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:

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();
}

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.

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! ;)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS