<legend id='DzIpS'><style id='DzIpS'><dir id='DzIpS'><q id='DzIpS'></q></dir></style></legend>
  1. <small id='DzIpS'></small><noframes id='DzIpS'>

  2. <tfoot id='DzIpS'></tfoot>

      <bdo id='DzIpS'></bdo><ul id='DzIpS'></ul>

      <i id='DzIpS'><tr id='DzIpS'><dt id='DzIpS'><q id='DzIpS'><span id='DzIpS'><b id='DzIpS'><form id='DzIpS'><ins id='DzIpS'></ins><ul id='DzIpS'></ul><sub id='DzIpS'></sub></form><legend id='DzIpS'></legend><bdo id='DzIpS'><pre id='DzIpS'><center id='DzIpS'></center></pre></bdo></b><th id='DzIpS'></th></span></q></dt></tr></i><div id='DzIpS'><tfoot id='DzIpS'></tfoot><dl id='DzIpS'><fieldset id='DzIpS'></fieldset></dl></div>

      如何在 Windows 7 中使用 OpenGL、Glut 和 Visual Studio

      时间:2023-09-17
        • <i id='ryiep'><tr id='ryiep'><dt id='ryiep'><q id='ryiep'><span id='ryiep'><b id='ryiep'><form id='ryiep'><ins id='ryiep'></ins><ul id='ryiep'></ul><sub id='ryiep'></sub></form><legend id='ryiep'></legend><bdo id='ryiep'><pre id='ryiep'><center id='ryiep'></center></pre></bdo></b><th id='ryiep'></th></span></q></dt></tr></i><div id='ryiep'><tfoot id='ryiep'></tfoot><dl id='ryiep'><fieldset id='ryiep'></fieldset></dl></div>
          <legend id='ryiep'><style id='ryiep'><dir id='ryiep'><q id='ryiep'></q></dir></style></legend>
            <tbody id='ryiep'></tbody>

          <small id='ryiep'></small><noframes id='ryiep'>

              <bdo id='ryiep'></bdo><ul id='ryiep'></ul>

              1. <tfoot id='ryiep'></tfoot>
              2. 本文介绍了如何在 Windows 7 中使用 OpenGL、Glut 和 Visual Studio 2008 准备 C++ 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                因为我在设置 Visual Studio 2008 以使用 OpenGL 时遇到了很多问题,所以我会问这个对某些人有用的问题:

                As I had many problems setting Visual Studio 2008 for using OpenGL I will ask this question that can be useful to some people:

                在 Visual Studio 2008 中使用 OpenGL 和 C++ 需要遵循哪些步骤?

                Which are the steps to follow in order to use OpenGL with C++ in Visual Studio 2008?

                推荐答案

                首先,您需要有一个视频卡并检查它是否可以与 OpenGL 配合使用,并且驱动程序是否已更新.我在这个链接 检查它.

                First of all you need to have a video card and check that it works with OpenGL and the drivers are updated. I used the test in this link to check it.

                检查是否正确安装了 Visual Studio 2008 以及是否在您的计算机中创建了以下路径也很重要:

                It is also important to check that Visual Studio 2008 is correctly installed and that the following path is created in your computer:

                C:Program FilesMicrosoft SDKsWindowsv6.0A

                C:Program FilesMicrosoft SDKsWindowsv6.0A

                现在我们可以按照安装步骤进行:

                Now we can follow the installation steps:

                1.- 下载 GLUT 从 https://www.opengl.org/resources/libraries/glut/glut_downloads.php,按照以下说明解压并复制文件:

                1.- Download GLUT from https://www.opengl.org/resources/libraries/glut/glut_downloads.php, unzip and copy the files as instructed below:

                • glut.h 到文件夹 C:Program FilesMicrosoft SDKsWindowsv6.0AIncludegl
                • glut32.lib 到文件夹 C:Program FilesMicrosoft SDKsWindowsv6.0ALib
                • glut32.dll 到文件夹 C:WindowsSystem32
                • glut.h to the folder C:Program FilesMicrosoft SDKsWindowsv6.0AIncludegl
                • glut32.lib to the folder C:Program FilesMicrosoft SDKsWindowsv6.0ALib
                • glut32.dll to the folder C:WindowsSystem32

                2.- 创建一个空的 C++ Win32 应用程序:

                2.- Create an empty C++ Win32 application:

                • 从文件菜单中选择新建 → 项目 (Ctrl+Shift+N).
                • 选择 Win32 项目,输入名称,然后单击确定.
                • 在向导中单击下一步,然后选中空项目旁边的框,并点击完成.

                3.- 添加一个新的 C++ 源文件:

                3.- Add a new C++ source file:

                • 在项目菜单下选择添加新项目 (Ctrl+Shift+A).
                • 选择 C++ 文件 (.cpp),输入名称,然后单击确定.

                4.- 链接到 OpenGL 库(重要步骤):

                4.- Link to the OpenGL libraries (important step):

                • 在项目"菜单下,选择底部的项目属性 (Alt+F7).
                • 从左侧的导航面板中选择配置属性 → 链接器 → 输入.
                • 从对话框顶部的配置下拉框中选择所有配置.这可确保您更改调试和发布配置的设置.
                • 在附加依赖项中输入opengl32.lib glu32.lib glut32.lib"并点击确定(opengl32.lib和glu32.lib已经在系统中,glut32.lib将在之后下载 GLUT).
                • Under the Project menu select Project Properties (Alt+F7) at the bottom.
                • Select Configuration Properties → Linker → Input from the navigation panel on the left.
                • Select All Configurations from the Configuration drop-down box at the top of the dialog. This ensures you are changing the settings for both the Debug and Release configurations.
                • Type "opengl32.lib glu32.lib glut32.lib" in Additional Dependencies and click OK (the opengl32.lib and glu32.lib are already in the system, and glut32.lib will be after downloading GLUT).

                5.- 下载此示例代码.

                6.- 还需要在 Visual Studio 中设置路径:

                6.- It is also necessary to set the paths in Visual Studio:

                • 在工具 -> 选项 -> VC++ 目录 -> 包含文件:

                • In Tools -> Options -> VC++ Directories -> Include Files:

                C:Program FilesMicrosoft SDKsWindowsv6.0AInclude

                C:Program FilesMicrosoft SDKsWindowsv6.0AInclude

              3. 在配置属性→链接器→附加库中目录:

              4. In Configuration Properties → Linker → Additional Library Directories:

                C:Program FilesMicrosoft SDKsWindowsv6.0ALib

                C:Program FilesMicrosoft SDKsWindowsv6.0ALib

              5. 这篇关于如何在 Windows 7 中使用 OpenGL、Glut 和 Visual Studio 2008 准备 C++ 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:从四元数到 OpenGL 旋转 下一篇:为什么我的翻译矩阵需要转置?

                相关文章

                最新文章

                    <small id='mqIrb'></small><noframes id='mqIrb'>

                    • <bdo id='mqIrb'></bdo><ul id='mqIrb'></ul>

                    <i id='mqIrb'><tr id='mqIrb'><dt id='mqIrb'><q id='mqIrb'><span id='mqIrb'><b id='mqIrb'><form id='mqIrb'><ins id='mqIrb'></ins><ul id='mqIrb'></ul><sub id='mqIrb'></sub></form><legend id='mqIrb'></legend><bdo id='mqIrb'><pre id='mqIrb'><center id='mqIrb'></center></pre></bdo></b><th id='mqIrb'></th></span></q></dt></tr></i><div id='mqIrb'><tfoot id='mqIrb'></tfoot><dl id='mqIrb'><fieldset id='mqIrb'></fieldset></dl></div>

                  1. <legend id='mqIrb'><style id='mqIrb'><dir id='mqIrb'><q id='mqIrb'></q></dir></style></legend>
                  2. <tfoot id='mqIrb'></tfoot>