本文介绍了在Visual C ++ Express Edition中使用GLUT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual C ++ Express Edition下使用 GLUT(OpenGL实用工具包)编译OpenGL应用程序的基本步骤是什么?

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

推荐答案

  1. 如果您没有Visual C ++ Express Edition(VCEE),请下载并安装 VCEE .
  2. Visual C ++ Express Edition的默认安装为.Net平台生成.由于.Net尚未完全支持OpenGL和GLUT,因此我们需要针对Windows平台进行构建.为此,我们需要Microsoft Platform SDK. (如果您使用的是VCEE的旧版本,请下载并安装 Microsoft平台SDK .将需要配置Visual C ++ Express Edition才能为Windows平台构建.所有这些说明均可用此处.)
  3. 如果您没有GLUT,请下载并解压缩Nate Robin的 GLUT的Windows端口.
  4. glut.h 添加到您的 Platform SDK/include/GL/目录
  5. 使用 glut.lib 链接项目. (转到VCEE 项目属性->其他链接程序目录,然后添加具有 glut.lib 的目录.
  6. glut.dll 添加到 Windows/System32 目录,以便所有使用GLUT的程序可以在运行时找到它.
  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 GLUTcan find it at runtime.

您使用GLUT或OpenGL的程序现在应在Visual C ++ Express Edition下编译.

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

这篇关于在Visual C ++ Express Edition中使用GLUT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 11:23