Using GLUT with Visual C++ Express Edition

后端 未结 2 1076
自闭症患者
自闭症患者 2021-02-05 21:07

What are the basic steps to compile an OpenGL application using GLUT (OpenGL Utility Toolkit) under Visual C++ Express Edition?

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-05 22:04

    1. If you don't have Visual C++ Express Edition (VCEE), download and install VCEE.
    2. The default install of Visual C++ Express Edition builds for the .Net platform. We'll need to build for the Windows platform since OpenGL and GLUT are not yet fully supported under .Net. For this we need the Microsoft Platform SDK. (If you're using an older version of VCEE, download and install the Microsoft Platform SDK. Visual C++ Express Edition will need to be configured to build for Windows platform. All these instructions are available here.)
    3. If you don't have GLUT, download and unzip Nate Robin's Windows port of GLUT.
    4. Add glut.h to your Platform SDK/include/GL/ directory
    5. Link the project with glut.lib. (Go to VCEE Project Properties -> Additional Linker Directories and add the directory which has glut.lib.
    6. Add glut.dll to the Windows/System32 directory, so that all programs using GLUT can find it at runtime.

    Your program which uses GLUT or OpenGL should compile under Visual C++ Express Edition now.

提交回复
热议问题