remove concept of settings object from library

This commit is contained in:
Konstantin Käfer
2014-04-30 13:47:03 +02:00
parent e95ece8333
commit 9bbdba9eab
20 changed files with 198 additions and 265 deletions

View File

@@ -3,6 +3,5 @@
#include "map/map.hpp"
#include "map/view.hpp"
#include "map/settings.hpp"
#endif

View File

@@ -1,27 +0,0 @@
#ifndef LLMR_MAP_SETTINGS
#define LLMR_MAP_SETTINGS
#include <llmr/util/noncopyable.hpp>
namespace llmr {
class Settings : private util::noncopyable {
public:
virtual void load() {}; // load into memory
virtual void persist() {}; // persist in memory (then call sync() if platform-appropriate)
virtual void sync() {}; // save to disk
virtual void clear() {}; // clear from memory and disk
virtual ~Settings() {}
public:
double longitude = 0;
double latitude = 0;
double scale = 0;
double angle = 0;
bool debug = false;
};
}
#endif

View File

@@ -3,8 +3,14 @@
namespace llmr {
class Map;
class View {
public:
virtual void initialize(Map *map) {
this->map = map;
}
// Called from the render (=GL) thread. Signals that the context should
// swap the front and the back buffer.
virtual void swap() = 0;
@@ -13,6 +19,9 @@ public:
// thread. This is typically just called once at the beginning of the
// renderer setup since the render thread doesn't switch the contexts.
virtual void make_active() = 0;
protected:
llmr::Map *map = nullptr;
};
}