gtsam_points
Loading...
Searching...
No Matches
pixel_buffer.hpp
Go to the documentation of this file.
1#ifndef GLK_PIXEL_BUFFER_HPP
2#define GLK_PIXEL_BUFFER_HPP
3
4#include <memory>
5#include <GL/gl3w.h>
6#include <Eigen/Core>
7
8#include <glk/texture.hpp>
9
10namespace glk {
11
13public:
14 PixelBuffer(const Eigen::Vector2i& size, int bytes_per_pixel);
16
17 void copy_from_texture(const glk::Texture& texture, GLuint format, GLuint type);
18
19 template <typename T>
20 std::vector<T> read_pixels();
21
22private:
23 int width;
24 int height;
25 int bytes_per_pixel;
26
27 GLuint pixel_buffer;
28};
29
30}
31
32#endif
Definition pixel_buffer.hpp:12
PixelBuffer(const Eigen::Vector2i &size, int bytes_per_pixel)
void copy_from_texture(const glk::Texture &texture, GLuint format, GLuint type)
std::vector< T > read_pixels()
Definition texture.hpp:10
Definition async_buffer_copy.hpp:6
std::enable_if_t< needs_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition make_shared.hpp:20