GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
graphic_system.h
[詳解]
1
3
4// Copyright(c) 2023-2025 Design Engineering Laboratory, Saitama University
5// Released under the MIT license
6// https://opensource.org/licenses/mit-license.php
7
8#ifndef DESIGNLAB_GRAPHIC_SYSTEM_H_
9#define DESIGNLAB_GRAPHIC_SYSTEM_H_
10
11#include <memory>
12
13#include <boost/thread.hpp>
14
16#include "fps_controller.h"
17#include "graphic_data_broker.h"
19
20
21namespace designlab
22{
23
79class GraphicSystem final
80{
81public:
83 explicit GraphicSystem(const std::shared_ptr<const ApplicationSettingRecord> setting_ptr);
84
85
89 void Main();
90
93 void ChangeGraphicMain(std::unique_ptr<IGraphicMain>&& graphic_main_ptr);
94
95private:
99 bool MyDxlibInit();
100
104 bool Loop();
105
107 void MyDxlibFinalize() const;
108
110 std::unique_ptr<IGraphicMain> graphic_main_ptr_;
111
113 const std::shared_ptr<const ApplicationSettingRecord> setting_ptr_;
114
116 FpsController fps_controller_;
117
120 boost::mutex mutex_;
121};
122
123} // namespace designlab
124
125
126#endif // DESIGNLAB_GRAPHIC_SYSTEM_H_
FPSを一定にキープするためのクラス.
Dxlibの処理を行うクラス.
void ChangeGraphicMain(std::unique_ptr< IGraphicMain > &&graphic_main_ptr)
グラフィックの表示を行うクラスを変更する.
void Main()
ウィンドウの表示を行う関数. boost::thread にこの関数を渡して並列処理を行う. メンバ関数の MyDxlibInit 関数に失敗した場合,終了する.