[C ++] [OpenGL] self-writing GUI (0) -- Introduction, openglgui
This article can be reproduced. For more information, see http://www.cnblogs.com/collectionne/p/6928612.html. The article is not complete. If you find this article in cnblogs, visit the previous link to view the latest version.
What is GUI
GUI isGraphical user interfaceGraphical user interface (graphical user interface) indicates that the user interface is displayed graphically on a computer.
The write GUI here refers to drawing on the screen.WidgetWidgets, and manage these controls. Controls, Like buttons and text boxes, constitute the basic components of a GUI program. (Note: If you have any questions about this section, please submit your comments !)
About this tutorial
Although this series of tutorials is self-written GUI, there are already many ready-made GUI Libraries available, such as Qt and wxWidgets (see here ). The standard library of C ++ does not provide the GUI library, so these GUI Libraries are not C ++ standard libraries, but third parties.
I already have so many GUI Libraries. Why do I have to write them myself? This is because of my personal experience-I used to write games with OpenGL. As the game is becoming more and more content, I am also on the agenda to add the GUI. At that time, I didn't know about the GUI Library (or even don't know It). Besides, it seems that I can't use it in this case (or write it myself if I can use it), so I wrote the GUI myself. So I learned how to write the GUI myself. I finally implemented the button (maybe there are tags), but the game is also obsolete.
There is a word called "wheel building". Although there are already good products, it is good to try writing it yourself. There are few articles about writing GUI on Baidu, so I plan to write a GUI tutorial series (using C ++ and OpenGL) to make up for the shortage of Baidu resources. Of course, I would like to share my experience.
Finally, for convenience, this tutorial uses Legacy OpenGL. It doesn't mean that I can't keep up with the times and get out, just for simplicity and convenience. Our focus is on implementing the GUI, so there is no need to waste time on writing shader, setting VBO, and VAO. Besides, if OpenGL is sufficient, you can rewrite the Legacy OpenGL code to the Modern OpenGL code.