TrueReality  v0.1.1912
trStart/Main.cpp
Go to the documentation of this file.
1 /*
2 * True Reality Open Source Game and Simulation Engine
3 * Copyright © 2021 Acid Rain Studios LLC
4 *
5 * This library is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License as published by the Free
7 * Software Foundation; either version 3.0 of the License, or (at your option)
8 * any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * @author Maxim Serebrennik
20 */
21 
22 #ifndef Main_CPP
23 #define Main_CPP
24 
25 //#include <osgViewer/GraphicsWindow>
26 
27 //#include <dtGame/gameapplication.h>
28 //#include <dtUtil/datapathutils.h>
29 //#include <dtUtil/log.h>
30 
31 //#include <trUtil\WindowCtr.h>
32 
33 #include <iostream>
34 
35 int main(int /*argc*/, char** /*argv*/)
36 {
38  //dtUtil::LogFile::SetFileName("VRSimLog.html");
39 
40  //dtUtil::LogFile::SetTitle("VR-Sim Lab Log File");
41  //
43  //#ifdef _DEBUG
44  //dtUtil::Log::GetInstance().SetAllLogLevels(dtUtil::Log::LOG_DEBUG);
45  //#else
46  //dtUtil::Log::GetInstance().SetAllLogLevels(dtUtil::Log::LOG_ERROR);
47  //#endif
48  //
49  //
51  //std::string dataPath = dtUtil::GetDeltaDataPathList();
52  //std::string deltaPath = dtUtil::GetDeltaRootPath();
53 
54  //dtUtil::SetDataFilePathList(dataPath + ";" +
55  // //dtCore::GetDeltaRootPath() + "/examples/data;" +
56  // //dtCore::GetDeltaRootPath() + "/examples/data/gui/imagesets;" +
57  // //dtCore::GetDeltaRootPath() + "/examples/data/gui/schemes;" +
58  // //dtCore::GetDeltaRootPath() + "/examples/data/gui/fonts;" +
59  // //dtCore::GetDeltaRootPath() + "/examples/data/gui/looknfeel;" +
60  // deltaPath + "./;" +
61  // deltaPath + "/Bin;" +
62  // deltaPath + "/Bin/Data;" +
63  // deltaPath + "/Bin/Content;" +
64  // deltaPath + "/Bin/Content/Data;" +
65  // deltaPath + "/Bin/Content/maps;" +
66  // deltaPath + "/Bin/Content/Particles;" +
67  // deltaPath + "/Bin/Content/Prefabs;" +
68  // deltaPath + "/Bin/Content/StaticMeshes;" +
69  // deltaPath + "/Bin/Content/Terrains;" +
70  // deltaPath + "/Bin/Content/Textures");
71 
72  //LOG_INFO("Path list is: " + dtUtil::GetDataFilePathList() );
73 
75  //std::string configFileName(deltaPath + "/Bin/config.xml");
76 
77  // ///////////////-----New-----/////////////
78  // /*
79  // dtCore::DeltaWin::DeltaWinTraits deltaTraits;
80  // deltaTraits.name = "My Huuuuuuge Window";
81  // deltaTraits.x = 100;
82  // deltaTraits.y = 100;
83  // deltaTraits.width = 800;
84  // deltaTraits.height = 800;
85  // deltaTraits.showCursor = true;
86  // deltaTraits.fullScreen = false;
87  // deltaTraits.realizeUponCreate = false;
88  // deltaTraits.inheritedWindowData = nullptr;
89  // deltaTraits.contextToShare = nullptr;
90  // deltaTraits.vsync = false;
91 
92 
93  // dtCore::RefPtr<dtCore::DeltaWin> mWin = new dtCore::DeltaWin(deltaTraits);
94 
95  // //wglSwapIntervalEXT(0); */
96  // ///////////////-----New-----/////////////
97  //try
98  //{
99  // //Create our Window Controller
100  // osg::ref_ptr<trUtil::WindowCtr> WinCtr = trUtil::WindowCtr::GetInstance();
101 
102  // //Create our Application Class
103  // osg::ref_ptr <dtGame::GameApplication> app = WinCtr->CreateApp(argc, argv, configFileName);
104 
105  // app->SetGameLibraryName("trCore");
106  // app->Config();
107  // app->Run();
108  // app = nullptr;
109 
110  // std::cerr << "\n\nVR-Sim Lab is now shutting down ... " << std::endl;
111  //}
112  //catch (const dtUtil::Exception& ex)
113  //{
114  // ex.LogException(dtUtil::Log::LOG_ERROR);
115 
116  // #ifdef _DEBUG
117  // system("pause");
118  // #endif
119 
120  // return -1;
121  //}
122 
123  //#ifdef _DEBUG
124  // system("pause");
125  //#endif
126 
127  return 0;
128 }
129 
130 #endif // Main_CPP
int main(int, char **)