Parcourir la source

ADDED: `rlBlitFramebuffer()`, required for deferred render

pull/3497/head
Ray il y a 1 an
Parent
révision
1407f6eb46
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. +9
    -0
      src/rlgl.h

+ 9
- 0
src/rlgl.h Voir le fichier

@ -617,6 +617,7 @@ RLAPI void rlDisableShader(void); // Disable shader progra
RLAPI void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo)
RLAPI void rlDisableFramebuffer(void); // Disable render texture (fbo), return to 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
// General render state
RLAPI void rlEnableColorBlend(void); // Enable color blending
@ -1713,6 +1714,14 @@ void rlDisableFramebuffer(void)
#endif
}
// Blit active framebuffer to main framebuffer
void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask)
{
#if (defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES3)) && defined(RLGL_RENDER_TEXTURES_HINT)
glBlitFramebuffer(srcX, srcY, srcWidth, srcHeight, dstX, dstY, dstWidth, dstHeight, bufferMask, GL_NEAREST);
#endif
}
// Activate multiple draw color buffers
// NOTE: One color buffer is always active by default
void rlActiveDrawBuffers(int count)

Chargement…
Annuler
Enregistrer