Author Topic: OpenGL Libraries  (Read 6086 times)

pghtech

  • Guest
OpenGL Libraries
« on: August 06, 2006, 03:49:38 pm »
Forgive me for asking such a newbie question....but

I am trying to find the OpenGl libraries since I know Code::Blocks doesn't come with it.  But I find a GLUT toolkit, but as a newbie I am not sure this is what i am looking for as far as getting the proper OpenGL libraries for Code::Blocks.  I guess I was expecting just .h files that I would through into the <include> directory of Code::Blocks.

Maybe someone can point out where I get these libraries, or if the GLUToolkit is what I need, then what i do with these makefiles since I thought they were Linux GNU specific.

Thanks,

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: OpenGL Libraries
« Reply #1 on: August 06, 2006, 05:52:37 pm »
The OpenGL library is usually shipped with the OS, or as part of your display driver. Under Windows, this may be the Microsoft OpenGL implementation, or one installed with your nVidia/ATI/whatever drivers. Under Linux, will be MESA rather than the Microsoft OpenGL implementation. This is what you need to use OpenGL.

To program with OpenGL, you need the gl.h header (and a few others if you plan to use extensions) and an import library. Both headers and import libraries are normally shipped with the compiler. I cannot guarantee this to be true for every compiler in the world, but it is certainly true for MinGW/gcc and the Microsoft compiler.

Also, you may want to have GLU, if for no other reason than to have gluLookAt, which is immensely helpful. GLU is not the same thing as GLUT. Normally, every installation of GL has GLU as well.

GLUT is a rather antiquated toolkit for GL that has not seen active development for several years. You generally do not need GLUT, unless you really need GLUT. That's to say that GLUT is not a requirement for OpenGL programs. It is just a wrapper that is supposed to make a few things easier.
You can get it from Nate Robbins' site (google for that name) if you must have it for some reason (for example, if your instructor uses GLUT for his examples), but it is generally a better idea to get something different that's actively maintained.
GLFW and freeglut are two examples for this, especially GLFW is very easy to set up and use.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: OpenGL Libraries
« Reply #2 on: August 07, 2006, 01:08:27 am »
I think GL only comes in VC++ with the platform SDK
« Last Edit: August 07, 2006, 01:28:21 am by Vampyre_Dark »
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: OpenGL Libraries
« Reply #3 on: August 07, 2006, 01:26:50 am »
Well, my MinGW has it, and I don't have the Platform SDK :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: OpenGL Libraries
« Reply #4 on: August 07, 2006, 01:28:43 am »
Well, my MinGW has it, and I don't have the Platform SDK :)
:oops: I meant VC++
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~