mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb/WebGL: Implement WEBGL_draw_buffers extension
This commit is contained in:
parent
de77a5e3ea
commit
55f7cb4f10
Notes:
github-actions[bot]
2025-01-21 20:37:38 +00:00
Author: https://github.com/Lubrsi
Commit: 55f7cb4f10
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3239
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/kalenikaliaksandr
8 changed files with 150 additions and 0 deletions
34
Libraries/LibWeb/WebGL/Extensions/WebGLDrawBuffers.h
Normal file
34
Libraries/LibWeb/WebGL/Extensions/WebGLDrawBuffers.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Luke Wilde <luke@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebGL/Types.h>
|
||||
|
||||
namespace Web::WebGL::Extensions {
|
||||
|
||||
class WebGLDrawBuffers : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLDrawBuffers, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(WebGLDrawBuffers);
|
||||
|
||||
public:
|
||||
static JS::ThrowCompletionOr<GC::Ptr<WebGLDrawBuffers>> create(JS::Realm&, GC::Ref<WebGLRenderingContext>);
|
||||
|
||||
void draw_buffers_webgl(Vector<GLenum> buffers);
|
||||
|
||||
protected:
|
||||
void initialize(JS::Realm&) override;
|
||||
void visit_edges(Visitor&) override;
|
||||
|
||||
private:
|
||||
WebGLDrawBuffers(JS::Realm&, GC::Ref<WebGLRenderingContext>);
|
||||
|
||||
GC::Ref<WebGLRenderingContext> m_context;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue