opengl开发环境搭建

一,下载Virtual Studio Community 2017

https://my.visualstudio.com/Downloads/Featured?mkt=zh-cn

二,下载GLFW(32-bits Windows binaries)

https://www.glfw.org/download.html

三,下载GLEW(Binaries Windows 32 bits and 64 bits)

http://glew.sourceforge.net/

四,用VS新建一个控制台的工程

       配置项目熟悉

    1. 配置属性 --> C/C++ --> 常规 --> 附加包含目录
    2. 配置属性 --> 链接器 --> 常规 --> 附加库目录
    3. 配置属性 --> 链接器 --> 输入 --> 附加依赖项

 

opengl32.lib
glfw3.lib
glew32s.lib

main.cpp

复制代码
// ConsoleApplication2.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>

#define GLEW_STATIC
#include<GL/glew.h>
#include <GLFW/glfw3.h>
 
int main()
{
    std::cout << "Hello World!\n";
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
复制代码

 

posted @   maxiongying  阅读(204)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
点击右上角即可分享
微信分享提示