- 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.
推薦閱讀
- 黑客攻防從入門到精通(實戰秘笈版)
- 大學計算機應用基礎實踐教程
- vSphere High Performance Cookbook
- PyTorch Artificial Intelligence Fundamentals
- 技術領導力:程序員如何才能帶團隊
- Python進階編程:編寫更高效、優雅的Python代碼
- Ray分布式機器學習:利用Ray進行大模型的數據處理、訓練、推理和部署
- Oracle數據庫從入門到運維實戰
- 深入分布式緩存:從原理到實踐
- C#應用程序設計教程
- Building Wireless Sensor Networks Using Arduino
- Julia 1.0 Programming Complete Reference Guide
- JavaScript悟道
- Elasticsearch Blueprints
- Test-Driven iOS Development with Swift