Description
想,都是问题。做,才是答案。
一个窗口事件发生,有glfwWindow捕获,产生glfw事件。通过在创建窗口时,设置的各种事件回调函数(glfwSetWindowSizeCallback(window,callback)),将glfw事件转化为Hazel事件,并用Application::OnEvent回调函数处理。
当项目中cpp文件多了以后,每个cpp文件编译时都需要解析其include的头文件,其中有些头文件可能被多个cpp文件所引用,但每个编译单元(cpp文件)都要独立解析各自的头文件,效率比较低。
因此,对于这些常用的,通常不会有修改的头文件(例如,iostream,vector,string....),可以预先编译好,变成一个二进制文件。在后续cpp文件编译,链接时,可以直接查找这个编译好的二进制文件,效率高。
怎么做?
PS: 如果pch.h中的头文件有任何一个改动,整个pch.h都需要重新编译。所以,不要将可能经常改动的头文件放入预编译头。
This app can be installed on your PC or mobile device. This will allow this web app to look and behave like any other installed app. You will find it in your app lists and be able to pin it to your home screen, start menus or task bars. This installed web app will also be able to safely interact with other apps and your operating system.
想,都是问题。做,才是答案。