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