]> git.sesse.net Git - casparcg/blob - common/gl/pixel_buffer_object.h
2.0.0.2:
[casparcg] / common / gl / pixel_buffer_object.h
1 #pragma once\r
2 \r
3 #include <memory>\r
4 \r
5 #include <boost/noncopyable.hpp>\r
6 \r
7 #include <Glee.h>\r
8 \r
9 #include <boost/tuple/tuple.hpp>\r
10 #include <boost/thread/future.hpp>\r
11 \r
12 namespace caspar { namespace common { namespace gl {\r
13         \r
14 class pixel_buffer_object : boost::noncopyable\r
15 {\r
16 public:\r
17         pixel_buffer_object();\r
18         pixel_buffer_object(size_t width, size_t height);\r
19         void create(size_t width, size_t height);\r
20         ~pixel_buffer_object(){}\r
21 \r
22         void begin_write();\r
23         void* end_write();\r
24 \r
25         void begin_read();\r
26         void* end_read();\r
27 \r
28         void bind_texture();\r
29 \r
30         size_t width() const;\r
31         size_t heigth() const;\r
32         size_t size() const;\r
33 \r
34         bool is_reading() const;\r
35         bool is_writing() const;\r
36                 \r
37 private:\r
38         struct implementation;\r
39         std::shared_ptr<implementation> impl_;\r
40 };\r
41 typedef std::shared_ptr<pixel_buffer_object> pixel_buffer_object_ptr;\r
42         \r
43 }}}