mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-15 23:09:05 +00:00
LibWeb/WebGL2: Implement createSampler
This commit is contained in:
parent
71521a7004
commit
8a9d1de1cf
Notes:
github-actions[bot]
2024-12-14 08:10:32 +00:00
Author: https://github.com/Lubrsi
Commit: 8a9d1de1cf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2905
4 changed files with 14 additions and 1 deletions
|
@ -113,6 +113,7 @@ static bool is_platform_object(Type const& type)
|
|||
"WebGLProgram"sv,
|
||||
"WebGLRenderbuffer"sv,
|
||||
"WebGLRenderingContext"sv,
|
||||
"WebGLSampler"sv,
|
||||
"WebGLShader"sv,
|
||||
"WebGLShaderPrecisionFormat"sv,
|
||||
"WebGLTexture"sv,
|
||||
|
|
|
@ -354,6 +354,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
#include <LibWeb/WebGL/WebGLProgram.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderbuffer.h>
|
||||
#include <LibWeb/WebGL/@class_name@.h>
|
||||
#include <LibWeb/WebGL/WebGLSampler.h>
|
||||
#include <LibWeb/WebGL/WebGLShader.h>
|
||||
#include <LibWeb/WebGL/WebGLShaderPrecisionFormat.h>
|
||||
#include <LibWeb/WebGL/WebGLTexture.h>
|
||||
|
@ -508,6 +509,15 @@ public:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "createSampler"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
GLuint handle = 0;
|
||||
glGenSamplers(1, &handle);
|
||||
return WebGLSampler::create(m_realm, handle);
|
||||
)~~~");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "shaderSource"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
Vector<GLchar*> strings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue