dl
dl_engine.h
浏览该文件的文档.
1
10#pragma once
11
12#include <string>
13#include <vector>
14
15namespace dl
16{
18class Engine
19{
20public:
22 struct Param
23 {
24 bool _setConsoleUtf8 = true;
25 bool _showInfo = true;
26 bool _useTime = true;
27 bool _useFreetype = true;
28 bool _useNet = true;
29 bool _useAction = true;
30 bool _usePhysics = true;
31 bool _useAudio = true;
32 bool _useScene = true;
33 bool _useHttp = true;
34 bool _useLanguage = true;
35 bool _useMidi = true;
36 bool _useAngelScript = true;
37 bool _useLua = true;
38 bool _test = false;
39 bool _useDefaultSkybox = true; // 是否使用默认天空盒
40 std::string _projectName = "project"; // 项目名
41
42 // 运行期修改也有效
43 bool _show3D = true; // 3d渲染开关
44 };
45 static void Init();
46 static void Release();
47 static Param& GetParamRef() { return _param; }
48 // 命令行参数
49 static const std::vector<std::string>& GetCmd() { return _vecCmd; }
50 static void _init_cmd(int argc, char** argv);
51private:
52 static Param _param;
53 static std::vector<std::string> _vecCmd;
54};
55
56}
引擎配置
static const std::vector< std::string > & GetCmd()
static Param & GetParamRef()
static void Release()
static void Init()
static void _init_cmd(int argc, char **argv)
选择性初始化组件
std::string _projectName