mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibWeb/WebGL2: Implement invalidateFramebuffer
This commit is contained in:
committed by
Alexander Kalenik
parent
2983ad10bc
commit
e26b524721
@@ -29,7 +29,11 @@ static bool is_webgl_object_type(StringView type_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)
|
||||
@@ -576,6 +580,14 @@ public:
|
||||
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) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
GLuint handle = 0;
|
||||
|
||||
Reference in New Issue
Block a user