summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2024-01-29 21:16:17 +0100
committerRay <[email protected]>2024-01-29 21:16:17 +0100
commitdeaffb06981b95976f7b055dc1085adb933a37cc (patch)
treeb89c752055083cd5011b115309798c99bf835c0d /src
parentbebf9547bd244727fa06a2ce1db2faf474ba23ad (diff)
downloadraylib-deaffb06981b95976f7b055dc1085adb933a37cc.tar.gz
raylib-deaffb06981b95976f7b055dc1085adb933a37cc.zip
Review PR #3746 formating
Diffstat (limited to 'src')
-rw-r--r--src/rcore.c12
-rw-r--r--src/rlgl.h7
2 files changed, 8 insertions, 11 deletions
diff --git a/src/rcore.c b/src/rcore.c
index b057fc05..f0af87f9 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -961,8 +961,7 @@ void EndMode2D(void)
rlLoadIdentity(); // Reset current matrix (modelview)
- if (rlGetActiveFramebuffer() == 0)
- rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
+ if (rlGetActiveFramebuffer() == 0) rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
}
// Initializes 3D mode with custom camera (3D)
@@ -1015,8 +1014,7 @@ void EndMode3D(void)
rlMatrixMode(RL_MODELVIEW); // Switch back to modelview matrix
rlLoadIdentity(); // Reset current matrix (modelview)
- if (rlGetActiveFramebuffer() == 0)
- rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
+ if (rlGetActiveFramebuffer() == 0) rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
rlDisableDepthTest(); // Disable DEPTH_TEST for 2D
}
@@ -1062,9 +1060,9 @@ void EndTextureMode(void)
// Set viewport to default framebuffer size
SetupViewport(CORE.Window.render.width, CORE.Window.render.height);
- // go back to the modelview state from BeginDrawing since we are back to the default FBO
- rlMatrixMode(RL_MODELVIEW); // Switch back to modelview matrix
- rlLoadIdentity(); // Reset current matrix (modelview)
+ // Go back to the modelview state from BeginDrawing since we are back to the default FBO
+ rlMatrixMode(RL_MODELVIEW); // Switch back to modelview matrix
+ rlLoadIdentity(); // Reset current matrix (modelview)
rlMultMatrixf(MatrixToFloat(CORE.Window.screenScale)); // Apply screen scaling if required
// Reset current fbo to screen size
diff --git a/src/rlgl.h b/src/rlgl.h
index 6dd3eb2c..cdc1bf21 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -621,7 +621,7 @@ RLAPI void rlDisableShader(void); // Disable shader progra
// Framebuffer state
RLAPI void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo)
RLAPI void rlDisableFramebuffer(void); // Disable render texture (fbo), return to default framebuffer
-RLAPI unsigned int rlGetActiveFramebuffer(void); // Returns the active render texture (fbo), 0 for default framebuffer
+RLAPI unsigned int rlGetActiveFramebuffer(void); // Get the currently active render texture (fbo), 0 for default framebuffer
RLAPI void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers
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
RLAPI void rlBindFramebuffer(unsigned int target, unsigned int framebuffer); // Bind framebuffer (FBO)
@@ -1729,12 +1729,11 @@ void rlEnableFramebuffer(unsigned int id)
// return the active render texture (fbo)
unsigned int rlGetActiveFramebuffer(void)
{
-#if (defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES3)) && defined(RLGL_RENDER_TEXTURES_HINT)
GLint fboId = 0;
+#if (defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES3)) && defined(RLGL_RENDER_TEXTURES_HINT)
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &fboId);
- return fboId;
#endif
- return 0;
+ return fboId;
}
// Disable rendering to texture