Welcome to mirror list, hosted at ThFree Co, Russian Federation.

oglcontextfactory.hpp « drape - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9d725c80dfa71d74d4f913d97a5e98569acdd04a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

#include "drape/oglcontext.hpp"

#include "base/mutex.hpp"

namespace dp
{

class OGLContextFactory
{
public:
  virtual ~OGLContextFactory() {}
  virtual OGLContext * getDrawContext() = 0;
  virtual OGLContext * getResourcesUploadContext() = 0;
};

class ThreadSafeFactory : public OGLContextFactory
{
public:
  ThreadSafeFactory(OGLContextFactory * factory);
  ~ThreadSafeFactory();
  virtual OGLContext * getDrawContext();
  virtual OGLContext * getResourcesUploadContext();

private:
  OGLContextFactory * m_factory;
  threads::Mutex m_mutex;
};

} // namespace dp