- 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.
推薦閱讀
- Ext JS Data-driven Application Design
- 編程珠璣(續(xù))
- 碼上行動:零基礎(chǔ)學會Python編程(ChatGPT版)
- Python王者歸來
- INSTANT CakePHP Starter
- C語言程序設(shè)計學習指導(dǎo)與習題解答
- JAVA程序設(shè)計實驗教程
- 零基礎(chǔ)Java學習筆記
- Python Interviews
- SignalR:Real-time Application Development(Second Edition)
- 從零開始學UI:概念解析、實戰(zhàn)提高、突破規(guī)則
- DevOps 精要:業(yè)務(wù)視角
- 深入大型數(shù)據(jù)集:并行與分布化Python代碼
- Managing Windows Servers with Chef
- HTML5+jQuery Mobile移動應(yīng)用開發(fā)