2024-11-13 09:46:25 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
2024-12-05 15:13:02 +00:00
|
|
|
* Copyright (c) 2024, Luke Wilde <luke@ladybird.org>
|
2024-11-13 09:46:25 +01:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2024-12-05 10:55:34 +00:00
|
|
|
#include <LibJS/Runtime/Realm.h>
|
2024-12-05 15:13:02 +00:00
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
2024-11-13 09:46:25 +01:00
|
|
|
#include <LibWeb/Bindings/WebGLFramebufferPrototype.h>
|
|
|
|
#include <LibWeb/WebGL/WebGLFramebuffer.h>
|
|
|
|
|
|
|
|
namespace Web::WebGL {
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DEFINE_ALLOCATOR(WebGLFramebuffer);
|
2024-11-13 09:46:25 +01:00
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
GC::Ref<WebGLFramebuffer> WebGLFramebuffer::create(JS::Realm& realm, WebGLRenderingContextBase& context, GLuint handle)
|
2024-12-05 10:55:34 +00:00
|
|
|
{
|
2024-12-17 06:15:53 +01:00
|
|
|
return realm.create<WebGLFramebuffer>(realm, context, handle);
|
2024-12-05 10:55:34 +00:00
|
|
|
}
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
WebGLFramebuffer::WebGLFramebuffer(JS::Realm& realm, WebGLRenderingContextBase& context, GLuint handle)
|
|
|
|
: WebGLObject(realm, context, handle)
|
2024-11-13 09:46:25 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
WebGLFramebuffer::~WebGLFramebuffer() = default;
|
|
|
|
|
2024-12-05 15:13:02 +00:00
|
|
|
void WebGLFramebuffer::initialize(JS::Realm& realm)
|
|
|
|
{
|
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLFramebuffer);
|
2025-04-20 16:22:57 +02:00
|
|
|
Base::initialize(realm);
|
2024-12-05 15:13:02 +00:00
|
|
|
}
|
|
|
|
|
2024-11-13 09:46:25 +01:00
|
|
|
}
|