/* * Copyright (c) 2024-2025, Aliaksandr Kalenik * Copyright (c) 2024-2025, Luke Wilde * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Web::WebGL { using namespace Web::HTML; class WebGLRenderingContextOverloads : public WebGLRenderingContextImpl { public: WebGLRenderingContextOverloads(JS::Realm&, NonnullOwnPtr); void buffer_data(WebIDL::UnsignedLong target, WebIDL::LongLong size, WebIDL::UnsignedLong usage); void buffer_data(WebIDL::UnsignedLong target, GC::Root data, WebIDL::UnsignedLong usage); void buffer_sub_data(WebIDL::UnsignedLong target, WebIDL::LongLong offset, GC::Root data); void compressed_tex_image2d(WebIDL::UnsignedLong target, WebIDL::Long level, WebIDL::UnsignedLong internalformat, WebIDL::Long width, WebIDL::Long height, WebIDL::Long border, GC::Root data); void compressed_tex_sub_image2d(WebIDL::UnsignedLong target, WebIDL::Long level, WebIDL::Long xoffset, WebIDL::Long yoffset, WebIDL::Long width, WebIDL::Long height, WebIDL::UnsignedLong format, GC::Root data); void read_pixels(WebIDL::Long x, WebIDL::Long y, WebIDL::Long width, WebIDL::Long height, WebIDL::UnsignedLong format, WebIDL::UnsignedLong type, GC::Root pixels); void tex_image2d(WebIDL::UnsignedLong target, WebIDL::Long level, WebIDL::Long internalformat, WebIDL::Long width, WebIDL::Long height, WebIDL::Long border, WebIDL::UnsignedLong format, WebIDL::UnsignedLong type, GC::Root pixels); void tex_image2d(WebIDL::UnsignedLong target, WebIDL::Long level, WebIDL::Long internalformat, WebIDL::UnsignedLong format, WebIDL::UnsignedLong type, TexImageSource source); void tex_sub_image2d(WebIDL::UnsignedLong target, WebIDL::Long level, WebIDL::Long xoffset, WebIDL::Long yoffset, WebIDL::Long width, WebIDL::Long height, WebIDL::UnsignedLong format, WebIDL::UnsignedLong type, GC::Root pixels); void tex_sub_image2d(WebIDL::UnsignedLong target, WebIDL::Long level, WebIDL::Long xoffset, WebIDL::Long yoffset, WebIDL::UnsignedLong format, WebIDL::UnsignedLong type, TexImageSource source); void uniform1fv(GC::Root location, Float32List v); void uniform2fv(GC::Root location, Float32List v); void uniform3fv(GC::Root location, Float32List v); void uniform4fv(GC::Root location, Float32List v); void uniform1iv(GC::Root location, Int32List v); void uniform2iv(GC::Root location, Int32List v); void uniform3iv(GC::Root location, Int32List v); void uniform4iv(GC::Root location, Int32List v); void uniform_matrix2fv(GC::Root location, bool transpose, Float32List value); void uniform_matrix3fv(GC::Root location, bool transpose, Float32List value); void uniform_matrix4fv(GC::Root location, bool transpose, Float32List value); }; }