facecam2d/src/main.cpp
Epicalert b9c9cb3de4
Make .local and .config directories on startup
Directories for the config file and custom data will be created when
Facecam2D starts.
2021-07-03 00:19:14 +08:00

46 lines
805 B
C++

#include <graphics.hpp>
#include <cv.hpp>
#include <paths.hpp>
#include <args.hpp>
#include <config.hpp>
#include <model.hpp>
#include <configfile.hpp>
#include <iostream>
#include <cstring>
int main (int argc, char** argv) {
std::cout << PROJECT_NAME " is starting..." << std::endl;
initPrefixes();
makePaths();
// load config file and apply it
configFileOpen(&optData);
#ifndef _WIN32
// parse arguments and apply them
argp_parse(&argp, argc, argv, 0, 0, 0);
#endif
std::cout << "Custom asset prefix: " << prefixCustom << std::endl;
std::cout << "Default asset prefix: " << prefixDefault << std::endl;
initGraphics();
//Model model(resolvePath("models/test.fma").c_str());
initCV();
while (true) {
cvFrame();
graphicsFrame();
#ifndef __APPLE__
cvShowFrame();
#endif
}
}