mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibWeb/WebGL: Track the shaders attached to a program
This is required to return original references to the shaders attached to a program from getAttachedShaders. This is required for Figma (and likely all other Emscripten compiled applications that use WebGL) to get it's own generated shader IDs from the shaders returned from getAttachedShaders.
This commit is contained in:
parent
3ab93667f5
commit
aa99853a5c
Notes:
github-actions[bot]
2025-01-21 20:38:32 +00:00
Author: https://github.com/Lubrsi
Commit: aa99853a5c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3239
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/kalenikaliaksandr
5 changed files with 86 additions and 9 deletions
|
@ -18,14 +18,19 @@ class WebGLShader final : public WebGLObject {
|
|||
GC_DECLARE_ALLOCATOR(WebGLShader);
|
||||
|
||||
public:
|
||||
static GC::Ref<WebGLShader> create(JS::Realm& realm, WebGLRenderingContextBase&, GLuint handle);
|
||||
static GC::Ref<WebGLShader> create(JS::Realm& realm, WebGLRenderingContextBase&, GLuint handle, GLenum type);
|
||||
|
||||
virtual ~WebGLShader();
|
||||
|
||||
GLenum type() const { return m_type; }
|
||||
|
||||
protected:
|
||||
explicit WebGLShader(JS::Realm&, WebGLRenderingContextBase&, GLuint handle);
|
||||
explicit WebGLShader(JS::Realm&, WebGLRenderingContextBase&, GLuint handle, GLenum type);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
GLenum m_type { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue