-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBackbufferPixmap.h
More file actions
29 lines (23 loc) · 967 Bytes
/
BackbufferPixmap.h
File metadata and controls
29 lines (23 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
#include "Pixmap.h"
namespace dawn
{
class BackbufferPixmap : public Pixmap
{
public:
BackbufferPixmap(vec2i position, vec2i size) : m_position(position), m_size(size) { }
virtual ~BackbufferPixmap() { }
virtual CONSTANTS::PixmapType type() const { return CONSTANTS::BackbufferPixmap; }
vec2i position() const { return m_position; }
void position(vec2i position) { setChanged(m_position != position); m_position = position; }
vec2i size() const { return m_size; }
void size(vec2i size) { setChanged(m_size != size); m_size = size; }
virtual BufferPtr buffer() { return BufferPtr(); } // TODO For now
virtual unsigned int width() { return m_size[0]; }
virtual unsigned int height() { return m_size[1]; }
virtual CONSTANTS::PixelFormat format() { return CONSTANTS::RGBFormat; }
protected:
vec2i m_position;
vec2i m_size;
};
}