mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/WebGL2: Implement vertexAttribI4(u)i(v)
This commit is contained in:
parent
35763ffe53
commit
2c13a2a68c
Notes:
github-actions[bot]
2025-10-21 21:34:38 +00:00
Author: https://github.com/Lubrsi
Commit: 2c13a2a68c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6538
Reviewed-by: https://github.com/gmta ✅
3 changed files with 42 additions and 4 deletions
|
|
@ -340,6 +340,40 @@ void WebGL2RenderingContextImpl::uniform_matrix3x4fv(GC::Root<WebGLUniformLocati
|
|||
glUniformMatrix3x4fv(location->handle(), span.size() / matrix_size, transpose, span.data());
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::vertex_attrib_i4i(WebIDL::UnsignedLong index, WebIDL::Long x, WebIDL::Long y, WebIDL::Long z, WebIDL::Long w)
|
||||
{
|
||||
m_context->make_current();
|
||||
glVertexAttribI4i(index, x, y, z, w);
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::vertex_attrib_i4iv(WebIDL::UnsignedLong index, Int32List values)
|
||||
{
|
||||
m_context->make_current();
|
||||
auto span = MUST(span_from_int32_list(values, /* src_offset= */ 0));
|
||||
if (span.size() < 4) [[unlikely]] {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
glVertexAttribI4iv(index, span.data());
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::vertex_attrib_i4ui(WebIDL::UnsignedLong index, WebIDL::UnsignedLong x, WebIDL::UnsignedLong y, WebIDL::UnsignedLong z, WebIDL::UnsignedLong w)
|
||||
{
|
||||
m_context->make_current();
|
||||
glVertexAttribI4ui(index, x, y, z, w);
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::vertex_attrib_i4uiv(WebIDL::UnsignedLong index, Uint32List values)
|
||||
{
|
||||
m_context->make_current();
|
||||
auto span = MUST(span_from_uint32_list(values, /* src_offset= */ 0));
|
||||
if (span.size() < 4) [[unlikely]] {
|
||||
set_error(GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
glVertexAttribI4uiv(index, span.data());
|
||||
}
|
||||
|
||||
void WebGL2RenderingContextImpl::vertex_attrib_i_pointer(WebIDL::UnsignedLong index, WebIDL::Long size, WebIDL::UnsignedLong type, WebIDL::Long stride, WebIDL::LongLong offset)
|
||||
{
|
||||
m_context->make_current();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue