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

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.

主站蜘蛛池模板: 黄浦区| 洮南市| 城固县| 沂水县| 云霄县| 江口县| 彭水| 保靖县| 邢台县| 于都县| 阿瓦提县| 通江县| 永昌县| 长宁区| 东平县| 达孜县| 建湖县| 团风县| 河西区| 邵阳市| 山西省| 北辰区| 民权县| 霍州市| 莒南县| 大足县| 宁夏| 吉林市| 油尖旺区| 太保市| 康定县| 枣庄市| 四子王旗| 株洲县| 酉阳| 徐闻县| 海安县| 澜沧| 彭山县| 三门峡市| 武陟县|