]> git.sesse.net Git - casparcg/blob - core/processor/device_buffer.h
35b76713979de9bb127cb4c5e9b47a8b5de14670
[casparcg] / core / processor / device_buffer.h
1 #pragma once\r
2 \r
3 #include "host_buffer.h"\r
4 \r
5 #include <boost/noncopyable.hpp>\r
6 \r
7 #include <memory>\r
8 \r
9 namespace caspar { namespace core {\r
10         \r
11 class device_buffer : boost::noncopyable\r
12 {\r
13 public:\r
14         device_buffer(size_t width, size_t height, size_t stride);\r
15         \r
16         size_t stride() const;  \r
17         size_t width() const;\r
18         size_t height() const;\r
19                 \r
20         void bind();\r
21         void unbind();\r
22 \r
23         void attach(int index);\r
24         void read(host_buffer& source);\r
25         void write(host_buffer& target);\r
26         \r
27 private:\r
28         struct implementation;\r
29         std::shared_ptr<implementation> impl_;\r
30 };\r
31 \r
32 }}