/* * 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(HTML::Window&, HTML::HTMLCanvasElement& canvas_element, JS::Value options); virtual ~WebGLRenderingContext() override; private: WebGLRenderingContext(HTML::Window&, HTML::HTMLCanvasElement&, NonnullOwnPtr context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters); }; } WRAPPER_HACK(WebGLRenderingContext, Web::WebGL)