mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 16:02:53 +00:00
LibWeb: Save OpenGL handle in WebGLObject
This commit is contained in:
parent
46cbbda944
commit
cfb394cad3
Notes:
github-actions[bot]
2024-12-03 22:37:03 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: cfb394cad3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2688
Reviewed-by: https://github.com/ADKaster ✅
15 changed files with 83 additions and 20 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -7,6 +8,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/WebGL/Types.h>
|
||||
|
||||
typedef unsigned int GLuint;
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
|
@ -19,14 +23,17 @@ public:
|
|||
String label() const { return m_label; }
|
||||
void set_label(String const& label) { m_label = label; }
|
||||
|
||||
GLuint handle() const { return m_handle; }
|
||||
|
||||
protected:
|
||||
explicit WebGLObject(JS::Realm&);
|
||||
explicit WebGLObject(JS::Realm&, GLuint handle);
|
||||
|
||||
bool invalidated() const { return m_invalidated; }
|
||||
|
||||
private:
|
||||
bool m_invalidated { false };
|
||||
String m_label;
|
||||
GLuint m_handle { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue