add clear_mark to clear only selected channels in the framebuffer

This commit is contained in:
2019-07-20 14:37:59 +02:00
parent 4b73647c98
commit 02fda636ab
2 changed files with 28 additions and 8 deletions

View File

@@ -27,6 +27,7 @@ public:
bool create(int width, int height, int tex = -1, GLint internal_format = GL_RGBA8, bool depth_buffer = false);
bool recreate() { return create(w, h); }
void clear(glm::vec4 color = glm::vec4(0));
void clear_mask(glm::bool4 mask, glm::vec4 color = glm::vec4(0));
glm::ivec4 calc_bounds();
uint8_t* readTextureData(uint8_t* buffer = nullptr);
float* readTextureDataFloat(float* buffer = nullptr);