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
    Senior 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
    Senior 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
    Senior 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.

Similar Threads

  1. newbie help
    By junior9000ca in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 10-24-2002, 06:54 AM
  2. Newbie Help
    By guest in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-18-2002, 09:58 AM
  3. Im such a newbie
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-25-2001, 08:09 AM
  4. Newbie ...
    By hayesj in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-05-2000, 12:00 PM
  5. Help for a Newbie
    By FerrariManF355 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-23-2000, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean