gtsam_points
Loading...
Searching...
No Matches
include
glk
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
10
namespace
glk
{
11
12
class
PixelBuffer
{
13
public
:
14
PixelBuffer
(
const
Eigen::Vector2i& size,
int
bytes_per_pixel);
15
~PixelBuffer
();
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
22
private
:
23
int
width;
24
int
height;
25
int
bytes_per_pixel;
26
27
GLuint
pixel_buffer;
28
};
29
30
}
31
32
#endif
glk::PixelBuffer
Definition
pixel_buffer.hpp:12
glk::PixelBuffer::PixelBuffer
PixelBuffer(const Eigen::Vector2i &size, int bytes_per_pixel)
glk::PixelBuffer::copy_from_texture
void copy_from_texture(const glk::Texture &texture, GLuint format, GLuint type)
glk::PixelBuffer::~PixelBuffer
~PixelBuffer()
glk::PixelBuffer::read_pixels
std::vector< T > read_pixels()
glk::Texture
Definition
texture.hpp:10
glk
Definition
async_buffer_copy.hpp:6
glk::make_shared
std::enable_if_t< needs_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition
make_shared.hpp:20
texture.hpp
Generated by
1.9.8