Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: VC++ newbie Q

  1. #1
    Guest

    VC++ newbie Q

    I'm just getting started in OpenGl, and I want to write in VC++ can anyone tell me what enviroment variables I need to set or do I only need to put the proper include statements in my programs?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    Re: VC++ newbie Q

    You need to link your project with those libraries :

    opengl32.lib, glu32.lib, glaux.dll.

    for the include statement :

    windows.h, gl.h, glu.h, glaux.h

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: VC++ newbie Q

    Um... Gorg's info is fine, but glaux is generally considered obsolete these days. Most people use GLUT instead, which has the added benefit of being cross-platform. It also comes with LOTS of examples.

    To get started with OpenGL/GLUT in MSVC:

    1. Create a project for a console app.

    2. Link with glut32.lib, glu32.lib, opengl32.lib

    3. Include "glut.h" - this includes gl.h and glu.h, and should be enough to get you started. You DON'T need "windows.h"

    You should be able to find links to GLUT on the main OpenGL site; if you have problems just drop me a line.

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    5

    Re: VC++ newbie Q

    The most important thing : The windows.h include must come before all *gl include

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: VC++ newbie Q

    The most important thing : The windows.h include must come before all *gl include

    No, not with GLUT. GLUT (at least the current version, 3.7) defines all Windows-specific macros used by gl.h/glu.h

    There are only 2 or 3 of these macros, so including the whole of windows.h is massive overkill, and the other 58 billion symbols it defines will just clutter up your namespace.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •