2024-12-05 19:12:40 -07:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2024, Andrew Kaster <andrew@ladybird.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/Realm.h>
|
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
|
|
|
#include <LibWeb/Bindings/WebGLSamplerPrototype.h>
|
|
|
|
#include <LibWeb/WebGL/WebGLSampler.h>
|
|
|
|
|
|
|
|
namespace Web::WebGL {
|
|
|
|
|
|
|
|
GC_DEFINE_ALLOCATOR(WebGLSampler);
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
GC::Ref<WebGLSampler> WebGLSampler::create(JS::Realm& realm, WebGLRenderingContextBase& context, GLuint handle)
|
2024-12-05 19:12:40 -07:00
|
|
|
{
|
2024-12-17 06:15:53 +01:00
|
|
|
return realm.create<WebGLSampler>(realm, context, handle);
|
2024-12-05 19:12:40 -07:00
|
|
|
}
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
WebGLSampler::WebGLSampler(JS::Realm& realm, WebGLRenderingContextBase& context, GLuint handle)
|
|
|
|
: WebGLObject(realm, context, handle)
|
2024-12-05 19:12:40 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
WebGLSampler::~WebGLSampler() = default;
|
|
|
|
|
|
|
|
void WebGLSampler::initialize(JS::Realm& realm)
|
|
|
|
{
|
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLSampler);
|
2025-04-20 16:22:57 +02:00
|
|
|
Base::initialize(realm);
|
2024-12-05 19:12:40 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|