glew的安装


 

下载链接:

https://sourceforge.net/project/downloading.php?group_id=67586&filename=glew-1.5.1-win32.zip

点击上面的链接下载最新的GLEW(支持OpenGL 3.0),解压,将 /bin/glew32.dll 拷贝到 c:/windows/system32 下面,将/lib/glew32.lib 拷贝到VC安装目录下的 lib 目录下(如:/Microsoft Visual Studio 9.0/VC/lib/下),将 /include/glew.h /include/wglew.h 拷贝到 VC 安装目录下的 /include/gl/ 目录下(如:/Microsoft Visual Studio 9.0/VC/include/gl/下)。在程序中我们只需要在包含glglu  glut.h 之前包含 glew.h就可以了(注意:一定要先包含 glew.h),在在代码中加上这么一句

#pragma comment (lib, "glew32.lib")  

示例: 

#include <GL/glew.h>

#include <GL/glut.h> 

#progrma comment(lib, "glew32.lib") 

在创建OpenGL渲染context之后,调用 glewInit(); 初始化glew就可以了。 


本文出处: http://blog.csdn.net/todayq/article/details/5925233

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
c++ opengl的glew, # GLEW - The OpenGL Extension Wrangler Library ![](http://glew.sourceforge.net/glew.png) http://glew.sourceforge.net/ https://github.com/nigels-com/glew [![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew) [![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download) ## Downloads Current release is [2.1.0](https://sourceforge.net/projects/glew/files/glew/2.1.0/). [(Change Log)](http://glew.sourceforge.net/log.html) Sources available as [ZIP](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip/download) or [TGZ](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz/download). Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0-win32.zip/download). ### Recent snapshots Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases. ## Build It is highly recommended to build from a tgz or zip release snapshot. The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac. For most end-users of GLEW the official releases are the best choice, with first class support. ### Linux and Mac #### Using GNU Make ##### Install build tools Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev` RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel` ##### Build $ make $ sudo make install $ make clean Targets: `all, glew.lib (sub-targets: glew.lib.shared, glew.lib.static), glew.bin, clean, install, uninstall` Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=` _Note: may need to make **auto** folder_ ####

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值