2023-04-18 07:24:48 +10:00
|
|
|
#ifndef FX_FRAMEBUFFER_H
|
|
|
|
#define FX_FRAMEBUFFER_H
|
|
|
|
|
|
|
|
#include <GLES2/gl2.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <wlr/types/wlr_output.h>
|
|
|
|
|
2023-06-03 08:53:41 +10:00
|
|
|
#include "sway/desktop/fx_renderer/fx_stencilbuffer.h"
|
2023-04-18 07:24:48 +10:00
|
|
|
#include "sway/desktop/fx_renderer/fx_texture.h"
|
|
|
|
|
|
|
|
struct fx_framebuffer {
|
|
|
|
GLuint fb;
|
2023-06-03 08:53:41 +10:00
|
|
|
struct fx_stencilbuffer stencil_buffer;
|
|
|
|
struct fx_texture texture;
|
2023-04-18 07:24:48 +10:00
|
|
|
};
|
|
|
|
|
2023-05-18 09:39:48 +10:00
|
|
|
struct fx_framebuffer fx_framebuffer_create();
|
|
|
|
|
2023-04-24 14:53:55 +10:00
|
|
|
void fx_framebuffer_bind(struct fx_framebuffer *buffer);
|
2023-04-18 07:24:48 +10:00
|
|
|
|
2023-05-18 09:39:48 +10:00
|
|
|
void fx_framebuffer_update(struct fx_framebuffer *buffer, int width, int height);
|
|
|
|
|
|
|
|
void fx_framebuffer_add_stencil_buffer(struct fx_framebuffer *buffer, int width, int height);
|
2023-04-18 07:24:48 +10:00
|
|
|
|
|
|
|
void fx_framebuffer_release(struct fx_framebuffer *buffer);
|
|
|
|
|
|
|
|
#endif
|