Oxygine  1
2g game engine
Mem2Native.h
1 #pragma once
2 #include "oxygine-include.h"
3 #include "ref_counter.h"
4 #include <vector>
5 #include <list>
6 #include "NativeTexture.h"
7 #include "Image.h"
8 #include "Mutex.h"
9 #include "ThreadDispatcher.h"
10 #include "res/CreateResourceContext.h"
11 
12 namespace oxygine
13 {
14  DECLARE_SMART(Image, spImage);
15  DECLARE_SMART(NativeTexture, spNativeTexture);
16 
17  class Mem2Native
18  {
19  public:
20  Mem2Native();
21  ~Mem2Native();
22 
23  bool isEmpty();
24 
25  void push(const CreateTextureTask& opt);
26  void update();
27 
28  void setUpdateSize(int size) {_size = size;}
29 
30  private:
31 
32  void updateTexture();
33  void textureDone();
34 
35  int _size;
36  Point _prev;
37 
38  CreateTextureTask* _opt;
39 
40  std::vector<unsigned char> _buffer;
41  ThreadDispatcher _messages;//todo, use global messages
42  };
43 }
Definition: Mem2Native.h:17
Definition: CreateResourceContext.h:80
Definition: ThreadDispatcher.h:45
–oxgl-end–!
Definition: Actor.h:14