mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Implement WebGL getVertexAttribOffset
This commit is contained in:
committed by
Jelle Raaijmakers
parent
1bc7e9d3f8
commit
50d66ba74c
Notes:
github-actions[bot]
2025-11-01 23:55:07 +00:00
Author: https://github.com/cqundefine Commit: https://github.com/LadybirdBrowser/ladybird/commit/50d66ba74cf Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6663 Reviewed-by: https://github.com/gmta ✅
@@ -1757,6 +1757,18 @@ JS::Value WebGLRenderingContextImpl::get_vertex_attrib(WebIDL::UnsignedLong inde
|
||||
}
|
||||
}
|
||||
|
||||
WebIDL::LongLong WebGLRenderingContextImpl::get_vertex_attrib_offset(WebIDL::UnsignedLong index, WebIDL::UnsignedLong pname)
|
||||
{
|
||||
if (pname != GL_VERTEX_ATTRIB_ARRAY_POINTER) {
|
||||
set_error(GL_INVALID_ENUM);
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLintptr result { 0 };
|
||||
glGetVertexAttribPointervRobustANGLE(index, GL_VERTEX_ATTRIB_ARRAY_POINTER, 1, nullptr, reinterpret_cast<void**>(&result));
|
||||
return result;
|
||||
}
|
||||
|
||||
void WebGLRenderingContextImpl::hint(WebIDL::UnsignedLong target, WebIDL::UnsignedLong mode)
|
||||
{
|
||||
m_context->make_current();
|
||||
|
||||
Reference in New Issue
Block a user