This function is used to update the framebuffer (to display it). If not used, the changes will not appear on the window.
void dg_framebuffer_update(dg_framebuffer_t *fb, sfRenderWindow *window);
dg_framebuffer_update(fb, window);
void dg_framebuffer_update(dg_framebuffer_t *fb, sfRenderWindow *window)
{
sfTexture_updateFromPixels((sfTexture *) sfSprite_getTexture(fb->sp),
fb->pixels, fb->width, fb->height, 0, 0);
sfRenderWindow_drawSprite(window, fb->sp, NULL);
}