mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-04-22 07:32:10 +02:00
Persistent display for OpenGL
This commit is contained in:
parent
a2d1ed0bac
commit
52fd083db4
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user