Tatooine
pixelunpackbuffer.h
Go to the documentation of this file.
1#ifndef TATOOINE_GL_PIXEL_UNPACK_BUFFER_H
2#define TATOOINE_GL_PIXEL_UNPACK_BUFFER_H
3
4#include <initializer_list>
5#include <iostream>
6#include <vector>
7#include "buffer.h"
8#include "dllexport.h"
9#include "errorcheck.h"
10#include "glincludes.h"
11
12//==============================================================================
13namespace tatooine::gl {
14//==============================================================================
15
16template <typename T>
17class pixelunpackbuffer : public buffer<GL_PIXEL_UNPACK_BUFFER, T> {
18 //----------------------------------------------------------------------------
19 // typedefs
20 //----------------------------------------------------------------------------
21 public:
25 //----------------------------------------------------------------------------
26 // ctors
27 //----------------------------------------------------------------------------
29 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
31 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
32 pixelunpackbuffer(pixelunpackbuffer&& other) : parent_type(std::move(other)) {}
33 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
35 : parent_type(n, usage) {}
36 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
37 pixelunpackbuffer(size_t n, const T& initial, buffer_usage usage = default_usage)
38 : parent_type(n, initial, usage) {}
39 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
40 pixelunpackbuffer(const std::vector<T>& data, buffer_usage usage = default_usage)
41 : parent_type(data, usage) {}
42 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
43 pixelunpackbuffer(std::initializer_list<T>&& list)
44 : parent_type(std::move(list), default_usage) {}
45
46 //----------------------------------------------------------------------------
47 // assign operators
48 //----------------------------------------------------------------------------
49 auto& operator=(const pixelunpackbuffer& other) {
51 return *this;
52 }
53 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
55 parent_type::operator=(std::move(other));
56 return *this;
57 }
58};
59
60//==============================================================================
61} // namespace tatooine::gl
62//==============================================================================
63
64#endif
buffer base class for each of the OpenGL buffer types
Definition: buffer.h:405
auto operator=(const buffer &other) -> buffer &
Definition: buffer.h:539
Definition: pixelunpackbuffer.h:17
pixelunpackbuffer(pixelunpackbuffer &&other)
Definition: pixelunpackbuffer.h:32
pixelunpackbuffer(const std::vector< T > &data, buffer_usage usage=default_usage)
Definition: pixelunpackbuffer.h:40
pixelunpackbuffer(size_t n, buffer_usage usage=default_usage)
Definition: pixelunpackbuffer.h:34
auto & operator=(const pixelunpackbuffer &other)
Definition: pixelunpackbuffer.h:49
auto & operator=(pixelunpackbuffer &&other)
Definition: pixelunpackbuffer.h:54
pixelunpackbuffer(size_t n, const T &initial, buffer_usage usage=default_usage)
Definition: pixelunpackbuffer.h:37
pixelunpackbuffer(std::initializer_list< T > &&list)
Definition: pixelunpackbuffer.h:43
pixelunpackbuffer(buffer_usage usage=default_usage)
Definition: pixelunpackbuffer.h:28
pixelunpackbuffer(const pixelunpackbuffer &other)
Definition: pixelunpackbuffer.h:30
static constexpr buffer_usage default_usage
Definition: pixelunpackbuffer.h:24
Definition: ansiformat.h:6
buffer_usage
Definition: buffer_usage.h:8