2024-12-17 06:15:53 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2025-03-06 23:41:31 +01:00
|
|
|
#include <LibWeb/Forward.h>
|
|
|
|
#include <LibWeb/WebIDL/Types.h>
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
namespace Web::WebGL {
|
|
|
|
|
2025-03-06 23:41:31 +01:00
|
|
|
// NOTE: This is the Variant created by the IDL wrapper generator, and needs to be updated accordingly.
|
|
|
|
using TexImageSource = Variant<GC::Root<HTML::ImageBitmap>, GC::Root<HTML::ImageData>, GC::Root<HTML::HTMLImageElement>, GC::Root<HTML::HTMLCanvasElement>, GC::Root<HTML::OffscreenCanvas>, GC::Root<HTML::HTMLVideoElement>>;
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
// FIXME: This object should inherit from Bindings::PlatformObject and implement the WebGLRenderingContextBase IDL interface.
|
|
|
|
// We should make WebGL code generator to produce implementation for this interface.
|
|
|
|
class WebGLRenderingContextBase {
|
|
|
|
public:
|
|
|
|
virtual GC::Cell const* gc_cell() const = 0;
|
2024-12-24 18:16:29 +00:00
|
|
|
virtual void visit_edges(JS::Cell::Visitor&) = 0;
|
2025-01-28 17:26:23 +00:00
|
|
|
virtual OpenGLContext& context() = 0;
|
2024-12-17 06:15:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|