diff options
| author | raysan5 <[email protected]> | 2020-09-18 02:11:49 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2020-09-18 02:11:49 +0200 |
| commit | cdc8850e6877084657a9c2be1142878e8e1a7f0a (patch) | |
| tree | 23e75572844f6a8dc689b231e201ec6e440828e0 /src/core.c | |
| parent | fa2c1146366557e5ce779d8b5c2575579dfa6389 (diff) | |
| download | raylib-cdc8850e6877084657a9c2be1142878e8e1a7f0a.tar.gz raylib-cdc8850e6877084657a9c2be1142878e8e1a7f0a.zip | |
WARNING: REDESIGN of rlgl framebuffers API #721
This redesign allows more flexibility when creating RenderTexture and a simplification (and hopefully removal) of `GenTexture*()` functions, that should not belong to this model but the user code, due to the use of custom shaders.
Also, this new API opens the door for a possible GBuffers type and advance rendering possibilities...
Some functions of the API have been also simplified or even removed.
rlgl module can be used as an standalone library, so, a version for the library has been added: v3.1.0, matching current raylib version.
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1543,7 +1543,7 @@ void BeginTextureMode(RenderTexture2D target) { rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2) - rlEnableRenderTexture(target.id); // Enable render target + rlEnableFramebuffer(target.id); // Enable render target // Set viewport to framebuffer size rlViewport(0, 0, target.texture.width, target.texture.height); @@ -1569,9 +1569,9 @@ void BeginTextureMode(RenderTexture2D target) // Ends drawing to render texture void EndTextureMode(void) { - rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2) + rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2) - rlDisableRenderTexture(); // Disable render target + rlDisableFramebuffer(); // Disable render target (fbo) // Set viewport to default framebuffer size SetupViewport(CORE.Window.render.width, CORE.Window.render.height); |
