mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-19 06:31:26 +02:00
Persistent display for OpenGL
This commit is contained in:
@@ -358,7 +358,8 @@ void clearScreen(float alpha)
|
||||
}
|
||||
else
|
||||
{
|
||||
glColor4f(0.0f, 0.0f, 0.0f, alpha);
|
||||
glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
|
||||
glColor4f(1.0f, 1.0f, 1.0f, alpha);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo);
|
||||
glBegin(GL_QUADS);
|
||||
glVertex2f(0, 0);
|
||||
@@ -367,6 +368,7 @@ void clearScreen(float alpha)
|
||||
glVertex2f(0, YRES);
|
||||
glEnd();
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
glBlendEquation(GL_FUNC_ADD);
|
||||
}
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
Reference in New Issue
Block a user