Author Topic: [Help]Eclipse C++ OpenGL on a mac  (Read 6922 times)

0 Members and 1 Guest are viewing this topic.

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
[Help]Eclipse C++ OpenGL on a mac
« on: August 14, 2013, 09:39:15 am »
Hello, I am using a mac right now and want to use OpenGL on C++.

I use the eclipse IDE. I have already setup my C++ enviroment so don't worry about that.

So I can get to this stage: http://www.paulsolt.com/GLUT/images/Properties2.jpg

But I have no idea how to add the libraries. When I go on the OpenGL site it just says that I should use Xcode.

I can find the OpenGL and GLUT files in Xcode. But I don't know how to move them over to eclipse.


Side note: I would use Xcode for this but the only tutorial I can find for Xcode C++ with OpenGL isn't using the up to date version of Xcode.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: [Help]Eclipse C++ OpenGL on a mac
« Reply #1 on: August 14, 2013, 11:36:29 am »
Well, I know absolutely nothing about C++ in Eclipse, but I can imagine it'll be similar to other IDE's.

First, you need to install your OpenGL devkit into a directory (I suggest somewhere with no spaces in the path).

Next you'll need to go to your project settings, add the path to the include folder in your installation path as well as add the path to the lib folder in their corresponding fields. Finally, you have to define the lib files you are using.

You'll likely find the include field under "Build Settings," the lib path is in the lower field on that screen, and you can see how the libs are defined for use in the upper field.

Edit: Ensure these are done for both build configurations, debug and release
« Last Edit: August 14, 2013, 11:37:37 am by Scipi »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: [Help]Eclipse C++ OpenGL on a mac
« Reply #2 on: August 14, 2013, 06:03:19 pm »
Thanks!

But on the site:http://www.opengl.org/wiki/Getting_started

On the mac part it doesn't offer a download and just says to use Xcode.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: [Help]Eclipse C++ OpenGL on a mac
« Reply #3 on: August 15, 2013, 12:10:42 am »
Looks like you just need to download Xcode because it comes with all the OpenGL headers. They just suggest it since it also comes with debuggers and GCC, making for easy setup. Just get Xcode, and it will install the OpenGL headers as part of it. You should be able to use any IDE for OpenGL development after that.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: [Help]Eclipse C++ OpenGL on a mac
« Reply #4 on: August 15, 2013, 07:42:15 am »
Just get Xcode, and it will install the OpenGL headers as part of it.

The thing is that I'm not quite sure how to do that

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Help]Eclipse C++ OpenGL on a mac
« Reply #5 on: August 15, 2013, 08:39:51 am »
It's free on the mac app store.
Once installed (it may take a while to download and install), also make sure to go to Preferences -> downloads (or something like that) and install the command line tools, it's quite useful

Anyway, I believe the OpenGL stuff will become available as a framework for projects
« Last Edit: August 15, 2013, 08:39:54 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: [Help]Eclipse C++ OpenGL on a mac
« Reply #6 on: August 15, 2013, 09:11:56 am »
I have Xcode.

But the problem is that I can't get OpenGL to work with C++ on Xcode.


Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: [Help]Eclipse C++ OpenGL on a mac
« Reply #7 on: August 15, 2013, 12:51:38 pm »
It should be the same procedure then, go to your project settings and tell the project which .lib files you are using and where it can find them along with the include files. if it's not working in Xcode, then it's likely because Xcode does not know where the necessary files are.

Also, remember for Mac

Code: [Select]
#include<OpenGL/gl.h> //Include like this
#include<GL/gl.h> //Not like this

You may want to also look into frameworks like Cocoa, as well.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: [Help]Eclipse C++ OpenGL on a mac
« Reply #8 on: August 15, 2013, 01:40:03 pm »
I looked through the OpenGL files in Xcode.

There are no .lib files. And as adriweb said it's framework.

Edit: Just to clarify. All I want to be able to do is to draw images and lines ect... with C++. To me it doesn't really matter the IDE or the library. It's just that OpenGL is apparently great.

Edit2: I have decided to use SDL. I think I have it working on Xcode. Link to the tutorial I used: http://meandmark.com/blog/2012/01/using-sdl-with-xcode-4/
« Last Edit: August 15, 2013, 08:18:46 pm by Augs »