OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
IGDoubleBuffer.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef IGDOUBLEBUFFER_H
19 #define IGDOUBLEBUFFER_H
20 
21 #include "index.h"
22 #include "IGBuffer.h"
23 
24 namespace Engine
25 {
30  {
31  public:
32  virtual ~IGDoubleBuffer(){}
33 
38  virtual void create( IGBuffer * front , IGBuffer * back , int size_data )=0;
39 
46  virtual void update( int offset , int size_data , void * data )=0;
47 
52  virtual void SwapBuffers(void)=0;
53 
54  uint getFrontBufferID(void)
55  {
56  return m_front_buffer_id;
57  }
58 
59  uint getBackBufferID(void)
60  {
61  return m_back_buffer_id;
62  }
63 
64 
65  protected:
66 
67  uint m_front_buffer_id;
68 
69  uint m_back_buffer_id;
70 
71  int m_size_data;
72  };
73 
74 
75 }
76 
77 
78 #endif // IGDOUBLEBUFFER_H
The IGDoubleBuffer - abstract / interface class.
Definition: IGDoubleBuffer.h:29
The IGBuffer - Interface class.
Definition: IGBuffer.h:29
Definition: element.h:23
virtual void create(IGBuffer *front, IGBuffer *back, int size_data)=0
create
virtual void update(int offset, int size_data, void *data)=0
update
virtual void SwapBuffers(void)=0
SwapBuffers.