Windows10下vs2017的OpenGL的配置
来源:互联网 发布:网络大电影收入来源 编辑:程序博客网 时间:2024/05/18 02:05
Windows10下vs2017的OpenGL的配置
有关Windows10下vs2017的OpenGL如何配置,可参照如下方法:
目录
用 [TOC]
来生成目录:
- Windows10下vs2017的OpenGL的配置
- 目录
- 下载OpenGL
- 配置OpenGL
- 测试
- 最后
下载OpenGL
- 打开网址:https://www.opengl.org/resources/libraries/glut/glut_downloads.php
- 找到标题为 GLUT for Microsoft Windows 9X, ME, 2000, NT & XP users,下面有:
- If you want just the GLUT header file, the .LIB, and .DLL files all pre-compiled for Intel platforms, you can simply download the glutdlls37beta.zip file (149 kilobytes)。
- 点击 glutdlls37beta.zip 即可下载。
配置OpenGL
- 将下载的 glutdlls37beta.zip 解压可发现里面包含 glut.dll glut32.dll glut.lib glut32.lib glut.h 5个文件。
- 然后找到vs2017安装的目录,路径为 (D:\Program)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include ,创建一个名为gl的文件夹,并将解压到的glut.h文件复制其中。
- 再找到路径为 (D:\Program)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\lib\x86 ,将解压到的glut.lib,glut32.lib复制其中。
- 最后把解压到的glut.dll和glut32.dll复制到C:\Windows\System32文件夹内(32位系统)或C:\Windows\SysWOW64(64位系统)。
测试
打开vs2017,新建一个C++的Windows控制台应用程序的空项目,将如下代码粘贴:
#include <GL/glut.h>void Show(){ glClear(GL_COLOR_BUFFER_BIT); glRectf(-0.1f, -0.1f, 0.5f, 0.5f); glFlush();}int main(int argc, char *argv[]){ glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE); glutInitWindowPosition(100, 100); glutInitWindowSize(800, 600); glutCreateWindow("OpenGL-ONE"); glutDisplayFunc(Show); glutMainLoop(); return 0;}
最后
如果你能成功运行如上代码,并且成功绘制了一个矩形,那么恭喜你,配置成功!
否则,就重新配喽~
王巍
2017年11月01日
阅读全文
0 0
- Windows10下vs2017的OpenGL的配置
- Windows10下VS2017配置OpenGL
- 初学者VS2017配置OpenGl的解决方案
- OpenGL的第一天【VS2017+OpenGL环境的配置】
- OpenGL的第一天【VS2017+OpenGL环境的配置】
- OpenGL + VS2015 + Windows10配置
- windows10 opengl配置
- VS2017+OpenCV3.2的配置
- 【caffe配置】face_detection_alighment在windows10+caffe+vs2015下的配置
- VS2017下boost配置
- vs2010下OpenGL的配置
- VC++下的OpenGL配置
- vs2010下的opengl配置
- linux 下openGL的配置
- linux下的openGL配置
- Windows10下JDK、eclipse与SDK及ADT的配置
- windows10下的mysql5.7解压版安装配置
- Windows10下的Android开发环境配置(Eclipse)
- Vue之动态路由、嵌套路由
- 使用TensorBoard
- hive启动警告:Establishing SSL connection without server's identity verification is not recommended
- TP-Link图像研发工程师秋招回忆
- Redis Cluster 介绍与使用
- Windows10下vs2017的OpenGL的配置
- Java 线程 6
- 梯度下降算法
- 如何通过反射来代替N多的if...else
- 【观察】阿里云栖大会究竟好在哪里?
- Windows下thinkphp5.0(tp5)的memcache数据缓存技术的实现过程
- DoRegisterDeviceInterfaceToHwnd 1066
- 利用MFC简单的显示一个bmp图像
- Visual Studio 2017各版本安装包离线下载、安装全解析