mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 20:29:42 +00:00
LibWeb/WebGL2: Implement drawElementsInstanced
This commit is contained in:
committed by
Alexander Kalenik
parent
c05fa44cf8
commit
42cce393f4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user