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-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-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-11-30 16:53:52 +01:00
|
|
|
GC::Ptr<WebGLBuffer> WebGLBuffer::create(JS::Realm& realm, GLuint handle)
|
|
|
|
{
|
|
|
|
return realm.heap().allocate<WebGLBuffer>(realm, handle);
|
|
|
|
}
|
|
|
|
|
|
|
|
WebGLBuffer::WebGLBuffer(JS::Realm& realm, GLuint handle)
|
|
|
|
: WebGLObject(realm, handle)
|
2024-11-13 09:35:57 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
WebGLBuffer::~WebGLBuffer() = default;
|
|
|
|
|
|
|
|
}
|