OpenGL学习记录(0)

  从今天开始学习OpenGL。

  首先,环境搭建,VS2013社区版+Freeglut 3.0.0。

  Freeglut介绍就不用了,自行Google。地址:http://sourceforge.net/projects/freeglut/

  下载之后解压,根据README搭建环境。

INSTALLATION
============

See README.cmake as a starting point, as well as the other README
files for further info.

----------------------------------------------------------------

Cmake 安装:

How to build freeglut with CMake on Windows (MS Visual Studio)
--------------------------------------------------------------
1. Download CMake (http://www.cmake.org/cmake/resources/software.html).
Get one of the releases from the binary distribution section.
2. Run the CMake installer, install wherever you like.
3. Launch CMake via Start > Program Files > CMake 2.8 > CMake (GUI)
(note that the shortcut put by the installer on your desktop does NOT
point to the CMake GUI program!)
4. In the "Where is the source code" box, type or browse to the root
directory of your freeglut source (so that's /freeglut, not
/freeglut/src).
5. In the "Where to build the binaries" box, type or browse to any
folder you like - this will be where the Visual Studio solution will be
generated. This folder does not have to exist yet.
6. Hit the Configure button near the bottom of the window.
7. Pick your target compiler, make sure that its installed on your
system of course!
8. Answer Ok when asked if you want to create the build directory.
9. Wait for the configure process to finish.
10. The screen will now have some configuration options on it, for
instance specifying whether you want to build static and/or shared
libraries (see below for a complete list). When you've selected your
options, click the Configure button again.
11. The Generate button at the bottom will now be enabled. Click Generate.
12. The build files will now be generated in the location you picked.

You can now navigate to the build directory you specified in step 5.Open the freeglut.sln file that was generated in your build directory,andcompile as usual.

  之后还需要把头文件、DLL和LIB复制到VS的目录下。

Installing the Libraries with MSVC
==================================

To install "freeglut" on your system so that your other projects will see it,
you will need to copy various files to various locations.

- The header files "freeglut.h", "freeglut_ext.h", "freeglut_std.h", and
"glut.h" (distributed in the directory "freeglut\freeglut\include\GL")
need to be copied to a "GL" directory under the MSVC include directory.
The MSVC include directory generally has a path similar to
"C:\Program Files\Microsoft Visual Studio\VC98\Include"
The "GL" subdirectory under that will probably already have the header
files "gl.h", "glaux.h", and "glu.h".
- The library file "freeglut.lib" or "freeglut_static.lib" (from the
corresponding debug or release directory) needs to be copied into the
MSVC library directory. This usually has a path similar to:
"%ProgramFiles%\Microsoft SDKs\Windows\v7.0A\Lib" - x86 32 bits LIB's
"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.0A\Lib" - x64 32 bits LIB's
"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.0A\Lib\x64" - x64 64 bits LIB's
Note that there is no "GL" subdirectory here. This directory should
already have the files "opengl32.lib", "glu32.lib", and "glaux.lib".
- If you are using the DLL version of "freeglut", the file "freeglut.dll"
needs to be copied from the Debug or the Release directory into the
DLL directory. This usually has a path similar to
"%SystemRoot%\System32\" - x86 32 bits DLL's
"%SystemRoot%\SysWOW64\" - x64 32 bits DLL's
"%SystemRoot%\System32\" - x64 64 bits DLL's
and will probably already have the files "opengl32.dll" and "glu32.dll".

   包含目录(include directory)、库文件目录(LIB directory)通过项目属性可以知道具体目录。

  点击编辑-》宏

  然后将DLL文件根据系统复制到对应目录即可。

 

 

  第一次写博客,欢迎指正。

转载于:https://www.cnblogs.com/uniqueS/p/4590706.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值