1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-23 20:29:42 +00:00

Ensures texture targets are initially clear.

This commit is contained in:
Thomas Harte 2019-02-25 21:55:14 -05:00
parent 4c5dee866b
commit 8f2abab0d9
2 changed files with 5 additions and 2 deletions

View File

@ -70,6 +70,9 @@ TextureTarget::TextureTarget(GLsizei width, GLsizei height, GLenum texture_unit,
break;
}
}
// Clear the framebuffer.
test_gl(glClear, GL_COLOR_BUFFER_BIT);
}
TextureTarget::~TextureTarget() {

View File

@ -77,9 +77,9 @@ class TextureTarget {
private:
GLuint framebuffer_ = 0, texture_ = 0, renderbuffer_ = 0;
GLsizei width_ = 0, height_ = 0;
const GLsizei width_ = 0, height_ = 0;
GLsizei expanded_width_ = 0, expanded_height_ = 0;
GLenum texture_unit_ = 0;
const GLenum texture_unit_ = 0;
mutable std::unique_ptr<Shader> pixel_shader_;
mutable GLuint drawing_vertex_array_ = 0, drawing_array_buffer_ = 0;