mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
LibWeb/WebGL2: Implement drawElementsInstanced
This commit is contained in:
parent
c05fa44cf8
commit
42cce393f4
Notes:
github-actions[bot]
2025-01-08 14:59:02 +00:00
Author: https://github.com/Lubrsi
Commit: 42cce393f4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2943
Reviewed-by: https://github.com/kalenikaliaksandr
2 changed files with 18 additions and 2 deletions
|
@ -32,6 +32,7 @@ static bool gl_function_modifies_framebuffer(StringView function_name)
|
|||
return function_name == "clear"sv
|
||||
|| function_name == "drawArrays"sv
|
||||
|| function_name == "drawElements"sv
|
||||
|| function_name == "drawElementsInstanced"sv
|
||||
|| function_name == "blitFramebuffer"sv
|
||||
|| function_name == "invalidateFramebuffer"sv;
|
||||
}
|
||||
|
@ -998,6 +999,14 @@ public:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "drawElementsInstanced"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
glDrawElementsInstanced(mode, count, type, reinterpret_cast<void*>(offset), instance_count);
|
||||
needs_to_present();
|
||||
)~~~");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "drawBuffers"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
glDrawBuffers(buffers.size(), buffers.data());
|
||||
|
@ -1125,6 +1134,13 @@ public:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "vertexAttribIPointer"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
glVertexAttribIPointer(index, size, type, stride, reinterpret_cast<void*>(offset));
|
||||
)~~~");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "getParameter"sv) {
|
||||
generate_get_parameter(function_impl_generator, webgl_version);
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue