- Hands-On C++ Game Animation Programming
- Gabor Szauer
- 118字
- 2021-06-30 14:45:48
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.
推薦閱讀
- 自己動手寫Java虛擬機
- 深入淺出Spring Boot 2.x
- Learning SAP Analytics Cloud
- 新編Premiere Pro CC從入門到精通
- Learning Firefox OS Application Development
- 從0到1:Python數據分析
- Elasticsearch Server(Third Edition)
- ExtJS高級程序設計
- Julia高性能科學計算(第2版)
- Android傳感器開發與智能設備案例實戰
- 監控的藝術:云原生時代的監控框架
- Django Design Patterns and Best Practices
- Mudbox 2013 Cookbook
- ArcPy and ArcGIS(Second Edition)
- C語言程序設計