mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 22:29:13 +00:00
LibWeb/WebGL2: Implement texSubImage3D with ArrayBufferView and offset
This commit is contained in:
committed by
Alexander Kalenik
parent
5cde82ac80
commit
e6ebec853b
@@ -670,6 +670,19 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "texSubImage3D"sv && function.overload_index == 0) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
void const* pixels_ptr = nullptr;
|
||||
if (src_data) {
|
||||
auto const& viewed_array_buffer = src_data->viewed_array_buffer();
|
||||
auto const& byte_buffer = viewed_array_buffer->buffer();
|
||||
pixels_ptr = byte_buffer.data() + src_offset;
|
||||
}
|
||||
glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_ptr);
|
||||
)~~~");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "getShaderParameter"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
GLint result = 0;
|
||||
|
||||
Reference in New Issue
Block a user