/* * Copyright (c) 2022, Luke Wilde * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::WebGL { class WebGLRenderingContext final : public WebGLRenderingContextBase { WEB_PLATFORM_OBJECT(WebGLRenderingContext, WebGLRenderingContextBase); public: static JS::ThrowCompletionOr> create(JS::Realm&, HTML::HTMLCanvasElement& canvas_element, JS::Value options); virtual ~WebGLRenderingContext() override; private: virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; WebGLRenderingContext(JS::Realm&, HTML::HTMLCanvasElement&, NonnullOwnPtr context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters); }; }