#include <epoxy/gl.h>#include <glib-object.h>Go to the source code of this file.
Functions | |
| G_BEGIN_DECLS FlFramebuffer * | fl_framebuffer_new (GLint format, size_t width, size_t height, gboolean depth_stencil) |
| FlFramebuffer * | fl_framebuffer_new_multisample (GLint format, size_t width, size_t height, gboolean use_msaa) |
| GLuint | fl_framebuffer_get_id (FlFramebuffer *framebuffer) |
| GLuint | fl_framebuffer_get_texture_id (FlFramebuffer *framebuffer) |
| size_t | fl_framebuffer_get_width (FlFramebuffer *framebuffer) |
| size_t | fl_framebuffer_get_height (FlFramebuffer *framebuffer) |
| size_t fl_framebuffer_get_height | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_height: @framebuffer: an #FlFramebuffer.
Gets the height of the framebuffer in pixels.
Returns: height in pixels.
Definition at line 206 of file fl_framebuffer.cc.
Referenced by composite_layer(), fl_opengl_frame_composite(), fl_opengl_frame_draw(), and fl_opengl_frame_get_size().
| GLuint fl_framebuffer_get_id | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_id: @framebuffer: an #FlFramebuffer.
Gets the ID for this framebuffer.
Returns: OpenGL framebuffer id or 0 if creation failed.
Definition at line 194 of file fl_framebuffer.cc.
Referenced by create_opengl_backing_store(), fl_compositor_opengl_composite_layers(), fl_opengl_frame_composite(), and TEST_F().
| GLuint fl_framebuffer_get_texture_id | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_texture_id: @framebuffer: an #FlFramebuffer.
Gets the ID of the texture associated with this framebuffer.
Returns: OpenGL texture id or 0 if creation failed.
Definition at line 198 of file fl_framebuffer.cc.
Referenced by composite_layer(), create_opengl_backing_store(), and TEST_F().
| size_t fl_framebuffer_get_width | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_width: @framebuffer: an #FlFramebuffer.
Gets the width of the framebuffer in pixels.
Returns: width in pixels.
Definition at line 202 of file fl_framebuffer.cc.
Referenced by composite_layer(), fl_opengl_frame_composite(), fl_opengl_frame_draw(), and fl_opengl_frame_get_size().
| G_BEGIN_DECLS FlFramebuffer* fl_framebuffer_new | ( | GLint | format, |
| size_t | width, | ||
| size_t | height, | ||
| gboolean | depth_stencil | ||
| ) |
FlFramebuffer:
#FlFramebuffer creates framebuffers and their backing textures for use by the Flutter compositor. fl_framebuffer_new: @format: format, e.g. GL_RGB, GL_BGR @width: width of texture. @height: height of texture. @depth_stencil: TRUE to attach a depth/stencil buffer, which is required to render into this framebuffer.
Creates a new frame buffer. Requires a valid OpenGL context to create.
Returns: a new #FlFramebuffer.
Definition at line 96 of file fl_framebuffer.cc.
References attach_depth_stencil(), create_texture(), format, height, and width.
Referenced by fl_opengl_frame_composite(), and TEST_F().
| FlFramebuffer* fl_framebuffer_new_multisample | ( | GLint | format, |
| size_t | width, | ||
| size_t | height, | ||
| gboolean | use_msaa | ||
| ) |
fl_framebuffer_new_multisample: @format: texture format, e.g. GL_RGBA, GL_BGRA_EXT. @width: width of framebuffer in pixels. @height: height of framebuffer in pixels. @use_msaa: TRUE to enable multisample anti-aliasing (MSAA) attachments.
Creates a new frame buffer, configuring MSAA attachments if supported and @use_msaa is TRUE.
When @use_msaa is TRUE, the framebuffer will configure 4x MSAA attachments using either implicit MSAA (multisampled texture via GL_EXT_multisampled_render_to_texture) with the requested @format or offscreen MSAA (multisample color renderbuffer). If offscreen MSAA is used, the framebuffer is backed by a GL_RGBA8 renderbuffer instead of a texture (fl_framebuffer_get_texture_id() returns 0) and must be resolved into a single-sample texture via glBlitFramebuffer before compositing.
If @use_msaa is FALSE or MSAA is not supported by the OpenGL context, a standard single-sample texture with @format and depth/stencil renderbuffer are created.
Returns: a new #FlFramebuffer.
Definition at line 124 of file fl_framebuffer.cc.
References attach_depth_stencil(), check_supports_implicit_msaa(), check_supports_offscreen_msaa(), create_texture(), format, height, and width.
Referenced by create_opengl_backing_store(), and TEST_F().