mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibWeb/WebGL2: Implement invalidateFramebuffer
This commit is contained in:
parent
2983ad10bc
commit
e26b524721
Notes:
github-actions[bot]
2025-01-08 15:00:35 +00:00
Author: https://github.com/Lubrsi
Commit: e26b524721
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2943
Reviewed-by: https://github.com/kalenikaliaksandr
2 changed files with 14 additions and 2 deletions
|
@ -298,7 +298,7 @@ interface mixin WebGL2RenderingContextBase {
|
||||||
// Framebuffer objects
|
// Framebuffer objects
|
||||||
undefined blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
undefined blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||||
[FIXME] undefined framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, GLint layer);
|
[FIXME] undefined framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, GLint layer);
|
||||||
[FIXME] undefined invalidateFramebuffer(GLenum target, sequence<GLenum> attachments);
|
undefined invalidateFramebuffer(GLenum target, sequence<GLenum> attachments);
|
||||||
[FIXME] undefined invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments, GLint x, GLint y, GLsizei width, GLsizei height);
|
[FIXME] undefined invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
undefined readBuffer(GLenum src);
|
undefined readBuffer(GLenum src);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,11 @@ static bool is_webgl_object_type(StringView type_name)
|
||||||
|
|
||||||
static bool gl_function_modifies_framebuffer(StringView function_name)
|
static bool gl_function_modifies_framebuffer(StringView function_name)
|
||||||
{
|
{
|
||||||
return function_name == "clearColor"sv || function_name == "drawArrays"sv || function_name == "drawElements"sv;
|
return function_name == "clearColor"sv
|
||||||
|
|| function_name == "drawArrays"sv
|
||||||
|
|| function_name == "drawElements"sv
|
||||||
|
|| function_name == "blitFramebuffer"sv
|
||||||
|
|| function_name == "invalidateFramebuffer"sv;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ByteString to_cpp_type(const IDL::Type& type, const IDL::Interface& interface)
|
static ByteString to_cpp_type(const IDL::Type& type, const IDL::Interface& interface)
|
||||||
|
@ -576,6 +580,14 @@ public:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (function.name == "invalidateFramebuffer"sv) {
|
||||||
|
function_impl_generator.append(R"~~~(
|
||||||
|
glInvalidateFramebuffer(target, attachments.size(), attachments.data());
|
||||||
|
needs_to_present();
|
||||||
|
)~~~");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (function.name == "createVertexArray"sv) {
|
if (function.name == "createVertexArray"sv) {
|
||||||
function_impl_generator.append(R"~~~(
|
function_impl_generator.append(R"~~~(
|
||||||
GLuint handle = 0;
|
GLuint handle = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue