官术网_书友最值得收藏!

Global variables

Two global variables are required for easy window cleanup: a pointer to the currently running application and a handle to the global OpenGL Vertex Array Object (VAO). Instead of each draw call having its own VAO, one will be bound for the entire duration of the sample.

To do this, create the following global variables:

Application* gApplication = 0;

GLuint gVertexArrayObject = 0;

Throughout the rest of this book, there will be no other global variables. Global variables can make the program state harder to track. The reason these two exist is to easily reference them when the application is shutting down later. Next, you will start implementing the WinMain function to open a new window.

主站蜘蛛池模板: 高清| 昆山市| 泊头市| 德安县| 宜宾市| 伊春市| 中西区| 沙雅县| 东兰县| 石台县| 安达市| 游戏| 洛阳市| 通道| 广饶县| 镶黄旗| 留坝县| 丰城市| 柞水县| 嘉峪关市| 南岸区| 济源市| 堆龙德庆县| 通城县| 秀山| 河津市| 山东省| 安顺市| 岚皋县| 中宁县| 孝义市| 浪卡子县| 怀柔区| 房山区| 锡林浩特市| 永城市| 玉树县| 丘北县| 绥江县| 冕宁县| 延长县|