Fix PixmapPresenter not glClear()'ing as expected

No more “smart” clearing shenanigans – those didn’t work properly
anyway.
This commit is contained in:
Elias Batek 2024-10-05 04:52:14 +02:00
parent fc4d833235
commit 3e661c407f
1 changed files with 14 additions and 27 deletions

View File

@ -515,8 +515,6 @@ final class OpenGl3PixmapRenderer : PixmapRenderer {
private { private {
PresenterObjectsContainer* _poc; PresenterObjectsContainer* _poc;
bool _clear = true;
GLfloat[16] _vertices; GLfloat[16] _vertices;
OpenGlShader _shader; OpenGlShader _shader;
GLuint _vao; GLuint _vao;
@ -552,7 +550,6 @@ final class OpenGl3PixmapRenderer : PixmapRenderer {
} }
void redrawOpenGlScene() { void redrawOpenGlScene() {
if (_clear) {
glClearColor( glClearColor(
_poc.config.renderer.background.r, _poc.config.renderer.background.r,
_poc.config.renderer.background.g, _poc.config.renderer.background.g,
@ -560,8 +557,6 @@ final class OpenGl3PixmapRenderer : PixmapRenderer {
_poc.config.renderer.background.a _poc.config.renderer.background.a
); );
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
_clear = false;
}
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, _texture); glBindTexture(GL_TEXTURE_2D, _texture);
@ -669,7 +664,6 @@ final class OpenGl3PixmapRenderer : PixmapRenderer {
glViewportPMP(viewport); glViewportPMP(viewport);
this.setupTexture(); this.setupTexture();
_clear = true;
} }
void redrawSchedule() { void redrawSchedule() {
@ -709,8 +703,6 @@ final class OpenGl1PixmapRenderer : PixmapRenderer {
private { private {
PresenterObjectsContainer* _poc; PresenterObjectsContainer* _poc;
bool _clear = true;
GLuint _texture = 0; GLuint _texture = 0;
} }
@ -788,7 +780,6 @@ final class OpenGl1PixmapRenderer : PixmapRenderer {
} }
void redrawOpenGlScene() { void redrawOpenGlScene() {
if (_clear) {
glClearColor( glClearColor(
_poc.config.renderer.background.r, _poc.config.renderer.background.r,
_poc.config.renderer.background.g, _poc.config.renderer.background.g,
@ -796,8 +787,6 @@ final class OpenGl1PixmapRenderer : PixmapRenderer {
_poc.config.renderer.background.a, _poc.config.renderer.background.a,
); );
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
_clear = false;
}
glBindTexture(GL_TEXTURE_2D, _texture); glBindTexture(GL_TEXTURE_2D, _texture);
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
@ -840,8 +829,6 @@ final class OpenGl1PixmapRenderer : PixmapRenderer {
this.setupTexture(); this.setupTexture();
this.setupMatrix(); this.setupMatrix();
_clear = true;
} }
public void redrawSchedule() { public void redrawSchedule() {