iridescence
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::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
Texture class to wrap OpenGL texture object.
Definition
texture.hpp:11
glk
Definition
async_buffer_copy.hpp:6
texture.hpp
Generated by
1.15.0