Reviewed framebuffers cleaning
Issues when dealing with FBOs
This commit is contained in:
parent
1a82e1ab26
commit
b760f16f9b
1 changed files with 3 additions and 6 deletions
|
@ -83,7 +83,7 @@
|
||||||
#define SUPPORT_MOUSE_GESTURES
|
#define SUPPORT_MOUSE_GESTURES
|
||||||
#define SUPPORT_CAMERA_SYSTEM
|
#define SUPPORT_CAMERA_SYSTEM
|
||||||
#define SUPPORT_GESTURES_SYSTEM
|
#define SUPPORT_GESTURES_SYSTEM
|
||||||
#define SUPPORT_BUSY_WAIT_LOOP
|
//#define SUPPORT_BUSY_WAIT_LOOP
|
||||||
#define SUPPORT_GIF_RECORDING
|
#define SUPPORT_GIF_RECORDING
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
@ -778,8 +778,8 @@ void DisableCursor()
|
||||||
// Set background color (framebuffer clear color)
|
// Set background color (framebuffer clear color)
|
||||||
void ClearBackground(Color color)
|
void ClearBackground(Color color)
|
||||||
{
|
{
|
||||||
// Clear full framebuffer (not only render area) to color
|
rlClearColor(color.r, color.g, color.b, color.a); // Set clear color
|
||||||
rlClearColor(color.r, color.g, color.b, color.a);
|
rlClearScreenBuffers(); // Clear current framebuffers
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup canvas (framebuffer) to start drawing
|
// Setup canvas (framebuffer) to start drawing
|
||||||
|
@ -789,7 +789,6 @@ void BeginDrawing(void)
|
||||||
updateTime = currentTime - previousTime;
|
updateTime = currentTime - previousTime;
|
||||||
previousTime = currentTime;
|
previousTime = currentTime;
|
||||||
|
|
||||||
rlClearScreenBuffers(); // Clear current framebuffers
|
|
||||||
rlLoadIdentity(); // Reset current matrix (MODELVIEW)
|
rlLoadIdentity(); // Reset current matrix (MODELVIEW)
|
||||||
rlMultMatrixf(MatrixToFloat(downscaleView)); // If downscale required, apply it here
|
rlMultMatrixf(MatrixToFloat(downscaleView)); // If downscale required, apply it here
|
||||||
|
|
||||||
|
@ -928,8 +927,6 @@ void BeginTextureMode(RenderTexture2D target)
|
||||||
|
|
||||||
rlEnableRenderTexture(target.id); // Enable render target
|
rlEnableRenderTexture(target.id); // Enable render target
|
||||||
|
|
||||||
rlClearScreenBuffers(); // Clear render texture buffers
|
|
||||||
|
|
||||||
// Set viewport to framebuffer size
|
// Set viewport to framebuffer size
|
||||||
rlViewport(0, 0, target.texture.width, target.texture.height);
|
rlViewport(0, 0, target.texture.width, target.texture.height);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue