mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb/WebGL: Implement the EXT_texture_filter_anisotropic extension
This commit is contained in:
committed by
Jelle Raaijmakers
parent
d08915a0cd
commit
b15f4424f9
Notes:
github-actions[bot]
2025-10-20 13:34:39 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/b15f4424f9f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6521 Reviewed-by: https://github.com/gmta ✅
@@ -1443,6 +1443,16 @@ JS::Value WebGLRenderingContextImpl::get_parameter(WebIDL::UnsignedLong pname)
|
||||
auto array_buffer = JS::ArrayBuffer::create(m_realm, move(byte_buffer));
|
||||
return JS::Int32Array::create(m_realm, 4, array_buffer);
|
||||
}
|
||||
case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: {
|
||||
if (ext_texture_filter_anisotropic_extension_enabled()) {
|
||||
GLfloat result { 0.0f };
|
||||
glGetFloatvRobustANGLE(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, 1, nullptr, &result);
|
||||
return JS::Value(result);
|
||||
}
|
||||
|
||||
set_error(GL_INVALID_ENUM);
|
||||
return JS::js_null();
|
||||
}
|
||||
default:
|
||||
dbgln("Unknown WebGL parameter name: {:x}", pname);
|
||||
set_error(GL_INVALID_ENUM);
|
||||
|
||||
Reference in New Issue
Block a user