OpenGL Windows 窗口程序环境搭建

OpenGL环境搭建步骤:

Downloading OpenGL

根据官网的说法:

In all three major desktop platforms (Linux, macOS, and Windows), OpenGL more or less comes with the system. However, you will need to ensure that you have downloaded and installed a recent driver for your graphics hardware.

OpenGL 的基础头文件什么的已经随系统提供,然后在安装好显卡驱动就可以下一步了。

Initialization && OpenGL Context Creation

初始化与获取OpenGL Context

方法有两种:

第一种:自己用windows的API写消息循环,获得HWND,然后初始化OpenGL

第二种:使用库,FreeGLUT,自动创建窗口并且获得OpenGL Context

介绍第二种,第一种以后抽时间记录。

首先FreeGLUT自从3.0以后只提供了源码,需要先下载下来然后用Cmake编译成dll。

未完待续。。。。

猜你喜欢

转载自www.cnblogs.com/ComputerPlayerJs/p/10498613.html