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 4 of 4

Thread: How initialize an open gl window in visual c++6

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    fr
    Posts
    9

    How initialize an open gl window in visual c++6

    I,

    I 'd like to know how can I initialize my open gl windows in a visual c++ program ?


    frog,

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Hannover, Germany
    Posts
    1,074

    Re: How initialize an open gl window in visual c++6

    Win 32 API or MFC?

  3. #3
    Guest

    Re: How initialize an open gl window in visual c++6

    i wanna know it too.
    how can i do it in win32

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Hannover, Germany
    Posts
    1,074

    Re: How initialize an open gl window in visual c++6

    0. register a window class ( RegisterClass )
    1. Create a window with CreateWindow
    2. Get its device context( GetDC )
    3. Set up a proper pixelformat that supports OpenGL (Look into SetPixelFormat, ChoosePixelFormat ).
    4. create an opengl context ( wglCreateContext I think that is )
    5. make opengl context current for rendering ( wglMakeCurrent ).

    The online help is quite good in vc6, so look into it to get further information on the mentioned api calls. There are quite good tutorials on the web to.
    For example:

    http://nehe.gamedev.net

Posting Permissions

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