OpenGL Graphics Window

Sid Kraft 96 Reputation points
2026-07-29T21:19:18.68+00:00

Been using the Visual Studio and C++ to procude graphics output with OpenGL. Have had several problems with getting the corre software input to use. A person at this site recommended having vcpkg install the freeglut system to utilize the .obj modules to produce the correct output. I did this and included:

#include <GL\freeglut.h>

#include <GL\gl.h>

and

#include <GL\glut.h>

Eliminated any references to added references in the Project elements VC++,C++ and Linker libraries, now works like a charm. Can finally get back to programming for the output. Thanks Microsoft Q&A, Sid Kraft

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-07-29T21:19:29.6866667+00:00

    OpenGL on Windows uses specific headers depending on what is being used:

    • Core OpenGL functions: #include <GL\gl.h>
    • OpenGL Utility Library: #include <GL\glu.h>
    • WGL functions: #include <windows.h>
    • Auxiliary library: #include <GL\glaux.h>

    For Windows-specific OpenGL development, the documented starting point is the Windows OpenGL guidance, including header files, pixel format tasks, rendering context tasks, double buffering, and multithreaded drawing strategies.

    The context does not document freeglut or glut.h, so only the Microsoft-documented headers above are supported here.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.