mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb/WebGL: Implement getShaderPrecisionFormat
This commit is contained in:
parent
a14cd5dab8
commit
bf2b8c5f2b
Notes:
github-actions[bot]
2024-12-05 20:42:25 +00:00
Author: https://github.com/Lubrsi
Commit: bf2b8c5f2b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2791
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/shannonbooth
8 changed files with 59 additions and 11 deletions
|
@ -1,24 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
* Copyright (c) 2024, Luke Wilde <luke@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/WebGL/WebGLObject.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/WebGL/Types.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
class WebGLShaderPrecisionFormat final : public WebGLObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLShaderPrecisionFormat, WebGLObject);
|
||||
class WebGLShaderPrecisionFormat final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLShaderPrecisionFormat, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(WebGLShaderPrecisionFormat);
|
||||
|
||||
public:
|
||||
virtual ~WebGLShaderPrecisionFormat();
|
||||
static GC::Ref<WebGLShaderPrecisionFormat> create(JS::Realm& realm, GLint range_min, GLint range_max, GLint precision);
|
||||
|
||||
virtual ~WebGLShaderPrecisionFormat() override;
|
||||
|
||||
GLint range_min() const { return m_range_min; }
|
||||
GLint range_max() const { return m_range_max; }
|
||||
GLint precision() const { return m_precision; }
|
||||
|
||||
protected:
|
||||
explicit WebGLShaderPrecisionFormat(JS::Realm&);
|
||||
explicit WebGLShaderPrecisionFormat(JS::Realm&, GLint range_min, GLint range_max, GLint precision);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
GLint m_range_min { 0 };
|
||||
GLint m_range_max { 0 };
|
||||
GLint m_precision { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue