This repository has been archived on 2019-09-17. You can view files and clone it, but cannot push or open issues or pull requests.
Files
research-project/src/fmri/main.cpp
Bert Peters 51b537676d Move Caffe simulation to a separate thread.
Teapot now shows pretty much instantly after starting the program, and
then only reappears when switching inputs.
2018-04-16 17:53:00 +02:00

47 lines
1007 B
C++

#include <algorithm>
#include <iostream>
#include <glog/logging.h>
#include <GL/glut.h>
#include <map>
#include <cstdarg>
#include "LayerData.hpp"
#include "Options.hpp"
#include "Simulator.hpp"
#include "glutils.hpp"
#include "RenderingState.hpp"
#include "LayerVisualisation.hpp"
#include "Range.hpp"
#include "visualisations.hpp"
using namespace std;
using namespace fmri;
int main(int argc, char *argv[])
{
google::InitGoogleLogging(argv[0]);
google::InstallFailureSignalHandler();
registerErrorCallbacks();
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA);
glutCreateWindow(argv[0]);
// Prepare data for simulations
Options options(argc, argv);
RenderingState::instance().loadOptions(options);
// Register callbacks
glutReshapeFunc(changeWindowSize);
RenderingState::instance().registerControls();
// Start visualisation
glutMainLoop();
google::ShutdownGoogleLogging();
return 0;
}