youtube:opengl-training-005
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| youtube:opengl-training-005 [2025/12/06 05:15] – Write sources freemikan | youtube:opengl-training-005 [2026/06/06 22:38] (現在) – Replace std::exit with return in main freemikan | ||
|---|---|---|---|
| 行 2: | 行 2: | ||
| {{ https:// | {{ https:// | ||
| + | <note warning> | ||
| + | このプログラムにはglfwTerminateの後にOpenGLの関数が呼び出されてしまう致命的な欠陥があります。 | ||
| + | もし参考にされる場合は、[[https:// | ||
| + | </ | ||
| ===== ソースコード ===== | ===== ソースコード ===== | ||
| {{ : | {{ : | ||
| 行 50: | 行 54: | ||
| find_package(Boost REQUIRED CONFIG) | find_package(Boost REQUIRED CONFIG) | ||
| - | include_directories(Boost_INCLUDE_DIR) | + | include_directories(${Boost_INCLUDE_DIRS}) |
| find_package(glfw3 REQUIRED) | find_package(glfw3 REQUIRED) | ||
| 行 188: | 行 192: | ||
| std::cerr << " | std::cerr << " | ||
| glfwTerminate(); | glfwTerminate(); | ||
| - | | + | |
| } | } | ||
| | | ||
| 行 196: | 行 200: | ||
| std::cerr << " | std::cerr << " | ||
| glfwTerminate(); | glfwTerminate(); | ||
| - | | + | |
| } | } | ||
| | | ||
| 行 206: | 行 210: | ||
| std::cerr << " | std::cerr << " | ||
| glfwTerminate(); | glfwTerminate(); | ||
| - | | + | |
| } | } | ||
| | | ||
| 行 226: | 行 230: | ||
| shader_program-> | shader_program-> | ||
| - | glfwTerminate(); | + | |
| + | // 一時的な回避策としてglfwTerminateを実行しないようにしておく。 | ||
| + | // glfwTerminate(); | ||
| std::clog << " | std::clog << " | ||
| 行 372: | 行 378: | ||
| ShaderObject:: | ShaderObject:: | ||
| : type_{other.type_}, | : type_{other.type_}, | ||
| - | type_ = 0; // nothing? | + | |
| - | name_ = 0; | + | |
| } | } | ||
youtube/opengl-training-005.1764965755.txt.gz · 最終更新: by freemikan
