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

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.

主站蜘蛛池模板: 惠水县| 铜陵市| 盐亭县| 巴楚县| 吴江市| 阜南县| 乐平市| 郁南县| 揭阳市| 酉阳| 张北县| 罗田县| 枝江市| 桑植县| 邵阳县| 汤阴县| 灌云县| 黔西| 新巴尔虎左旗| 郁南县| 天台县| 绥宁县| 乌什县| 湖南省| 谢通门县| 安陆市| 沈阳市| 柳州市| 宜兰市| 巴青县| 怀远县| 横山县| 文水县| 科技| 从江县| 平远县| 丰镇市| 开封市| 格尔木市| 信丰县| 金阳县|