Skip to content

Commit deaffb0

Browse files
committed
Review PR #3746 formating
1 parent bebf954 commit deaffb0

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/rcore.c

+5-7
Original file line numberDiff line numberDiff line change
@@ -961,8 +961,7 @@ void EndMode2D(void)
961961

962962
rlLoadIdentity(); // Reset current matrix (modelview)
963963

964-
if (rlGetActiveFramebuffer() == 0)
965-
rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
964+
if (rlGetActiveFramebuffer() == 0) rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
966965
}
967966

968967
// Initializes 3D mode with custom camera (3D)
@@ -1015,8 +1014,7 @@ void EndMode3D(void)
10151014
rlMatrixMode(RL_MODELVIEW); // Switch back to modelview matrix
10161015
rlLoadIdentity(); // Reset current matrix (modelview)
10171016

1018-
if (rlGetActiveFramebuffer() == 0)
1019-
rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
1017+
if (rlGetActiveFramebuffer() == 0) rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
10201018

10211019
rlDisableDepthTest(); // Disable DEPTH_TEST for 2D
10221020
}
@@ -1062,9 +1060,9 @@ void EndTextureMode(void)
10621060
// Set viewport to default framebuffer size
10631061
SetupViewport(CORE.Window.render.width, CORE.Window.render.height);
10641062

1065-
// go back to the modelview state from BeginDrawing since we are back to the default FBO
1066-
rlMatrixMode(RL_MODELVIEW); // Switch back to modelview matrix
1067-
rlLoadIdentity(); // Reset current matrix (modelview)
1063+
// Go back to the modelview state from BeginDrawing since we are back to the default FBO
1064+
rlMatrixMode(RL_MODELVIEW); // Switch back to modelview matrix
1065+
rlLoadIdentity(); // Reset current matrix (modelview)
10681066
rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
10691067

10701068
// Reset current fbo to screen size

src/rlgl.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ RLAPI void rlDisableShader(void); // Disable shader progra
621621
// Framebuffer state
622622
RLAPI void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo)
623623
RLAPI void rlDisableFramebuffer(void); // Disable render texture (fbo), return to default framebuffer
624-
RLAPI unsigned int rlGetActiveFramebuffer(void); // Returns the active render texture (fbo), 0 for default framebuffer
624+
RLAPI unsigned int rlGetActiveFramebuffer(void); // Get the currently active render texture (fbo), 0 for default framebuffer
625625
RLAPI void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers
626626
RLAPI void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask); // Blit active framebuffer to main framebuffer
627627
RLAPI void rlBindFramebuffer(unsigned int target, unsigned int framebuffer); // Bind framebuffer (FBO)
@@ -1729,12 +1729,11 @@ void rlEnableFramebuffer(unsigned int id)
17291729
// return the active render texture (fbo)
17301730
unsigned int rlGetActiveFramebuffer(void)
17311731
{
1732-
#if (defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES3)) && defined(RLGL_RENDER_TEXTURES_HINT)
17331732
GLint fboId = 0;
1733+
#if (defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES3)) && defined(RLGL_RENDER_TEXTURES_HINT)
17341734
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &fboId);
1735-
return fboId;
17361735
#endif
1737-
return 0;
1736+
return fboId;
17381737
}
17391738

17401739
// Disable rendering to texture

0 commit comments

Comments
 (0)