Binary object storage, misc changes
This commit is contained in:
30
texture.hh
30
texture.hh
@@ -32,6 +32,21 @@ public:
|
||||
glDeleteFramebuffers(1, &_fbID);
|
||||
}
|
||||
|
||||
Framebuffer(Framebuffer const& copy) = delete;
|
||||
Framebuffer& operator=(Framebuffer const& copy) = delete;
|
||||
|
||||
Framebuffer(Framebuffer && move) : _fbID(move._fbID) {
|
||||
move._fbID = 0;
|
||||
}
|
||||
|
||||
Framebuffer& operator=(Framebuffer && move) {
|
||||
glDeleteFramebuffers(1, &_fbID);
|
||||
_fbID = move._fbID;
|
||||
move._fbID = 0;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void bind() const {
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, _fbID);
|
||||
}
|
||||
@@ -139,6 +154,21 @@ public:
|
||||
glDeleteTextures(1, &_texID);
|
||||
}
|
||||
|
||||
Texture2D(Texture2D const& copy) = delete;
|
||||
Texture2D& operator=(Texture2D const& copy) = delete;
|
||||
|
||||
Texture2D(Texture2D && move) : _texID(move._texID) {
|
||||
move._texID = 0;
|
||||
}
|
||||
|
||||
Texture2D& operator=(Texture2D && move) {
|
||||
glDeleteTextures(1, &_texID);
|
||||
_texID = move._texID;
|
||||
move._texID = 0;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void bind() {
|
||||
glBindTexture(GL_TEXTURE_2D, _texID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user