mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/WebGL2: Implement compressedTex(Sub)Image3D
This commit is contained in:
parent
8dcbe69eb6
commit
2b941731a7
Notes:
github-actions[bot]
2025-10-21 21:34:24 +00:00
Author: https://github.com/Lubrsi
Commit: 2b941731a7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6538
Reviewed-by: https://github.com/gmta ✅
3 changed files with 20 additions and 2 deletions
|
|
@ -1058,6 +1058,22 @@ void WebGL2RenderingContextImpl::compressed_tex_sub_image2d(WebIDL::UnsignedLong
|
|||
glCompressedTexSubImage2DRobustANGLE(target, level, xoffset, yoffset, width, height, format, pixels.size(), pixels.size(), pixels.data());
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::compressed_tex_image3d(WebIDL::UnsignedLong target, WebIDL::Long level, WebIDL::UnsignedLong internalformat, WebIDL::Long width, WebIDL::Long height, WebIDL::Long depth, WebIDL::Long border, GC::Root<WebIDL::ArrayBufferView> src_data, WebIDL::UnsignedLongLong src_offset, WebIDL::UnsignedLong src_length_override)
|
||||
{
|
||||
m_context->make_current();
|
||||
|
||||
auto pixels = SET_ERROR_VALUE_IF_ERROR(get_offset_span<u8 const>(*src_data, src_offset, src_length_override), GL_INVALID_VALUE);
|
||||
glCompressedTexImage3DRobustANGLE(target, level, internalformat, width, height, depth, border, pixels.size(), pixels.size(), pixels.data());
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::compressed_tex_sub_image3d(WebIDL::UnsignedLong target, WebIDL::Long level, WebIDL::Long xoffset, WebIDL::Long yoffset, WebIDL::Long zoffset, WebIDL::Long width, WebIDL::Long height, WebIDL::Long depth, WebIDL::UnsignedLong format, GC::Root<WebIDL::ArrayBufferView> src_data, WebIDL::UnsignedLongLong src_offset, WebIDL::UnsignedLong src_length_override)
|
||||
{
|
||||
m_context->make_current();
|
||||
|
||||
auto pixels = SET_ERROR_VALUE_IF_ERROR(get_offset_span<u8 const>(*src_data, src_offset, src_length_override), GL_INVALID_VALUE);
|
||||
glCompressedTexSubImage3DRobustANGLE(target, level, xoffset, yoffset, zoffset, width, height, depth, format, pixels.size(), pixels.size(), pixels.data());
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::uniform1fv(GC::Root<WebGLUniformLocation> location, Float32List values, WebIDL::UnsignedLongLong src_offset, WebIDL::UnsignedLong src_length)
|
||||
{
|
||||
m_context->make_current();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue