mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Add WebGLTexture
This commit is contained in:
parent
2b09afb971
commit
f2a1643650
Notes:
github-actions[bot]
2024-11-13 10:43:06 +00:00
Author: https://github.com/gmta
Commit: f2a1643650
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2308
7 changed files with 55 additions and 0 deletions
21
Libraries/LibWeb/WebGL/WebGLTexture.cpp
Normal file
21
Libraries/LibWeb/WebGL/WebGLTexture.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/WebGLTexturePrototype.h>
|
||||
#include <LibWeb/WebGL/WebGLTexture.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(WebGLTexture);
|
||||
|
||||
WebGLTexture::WebGLTexture(JS::Realm& realm)
|
||||
: WebGLObject(realm)
|
||||
{
|
||||
}
|
||||
|
||||
WebGLTexture::~WebGLTexture() = default;
|
||||
|
||||
}
|
24
Libraries/LibWeb/WebGL/WebGLTexture.h
Normal file
24
Libraries/LibWeb/WebGL/WebGLTexture.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/WebGL/WebGLObject.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
class WebGLTexture final : public WebGLObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLTexture, WebGLObject);
|
||||
JS_DECLARE_ALLOCATOR(WebGLTexture);
|
||||
|
||||
public:
|
||||
virtual ~WebGLTexture();
|
||||
|
||||
protected:
|
||||
explicit WebGLTexture(JS::Realm&);
|
||||
};
|
||||
|
||||
}
|
6
Libraries/LibWeb/WebGL/WebGLTexture.idl
Normal file
6
Libraries/LibWeb/WebGL/WebGLTexture.idl
Normal file
|
@ -0,0 +1,6 @@
|
|||
#import <WebGL/WebGLObject.idl>
|
||||
|
||||
// https://registry.khronos.org/webgl/specs/latest/1.0/#5.9
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLTexture : WebGLObject {
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue