2020-09-27 13:53:45 -07:00

59 lines
1.3 KiB
C++

/**
This file is a part of our_dick
Copyright (C) 2020 rexy712
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OUR_DICK_GRAPHICS_RBO_HPP
#define OUR_DICK_GRAPHICS_RBO_HPP
#include "gl_include.hpp"
namespace gfx{
class rbo
{
private:
GLuint m_buffer;
GLenum m_format;
GLsizei m_width;
GLsizei m_height;
public:
rbo(GLsizei width, GLsizei height, GLenum format, GLsizei samples = 0);
rbo(const rbo& r) = delete;
rbo(rbo&& r);
~rbo();
rbo& operator=(const rbo& r) = delete;
rbo& operator=(rbo&& r);
GLuint raw()const;
void bind()const;
void unbind()const;
void resize(GLsizei w, GLsizei h);
void reformat(GLenum format);
GLsizei get_width()const;
GLsizei get_height()const;
};
}
#endif